Is there a TextArea in ASP.NET
You can use the TextBox webserver control and set the TextMode = MultiLine
How can I show what page the user is on using in-built paging functionality. CurrentPageIndex Property Shows Up as 0
In PageIndexChanged event write VB.NET Dim pageindex As Integer = DataGrid1.CurrentPageIndex + 1 LblPageInfo.Text = 'Page ' + pageindex.ToString() + ' of ' + DataGrid1.PageCount.ToString() C# int pageindex = DataGrid1.CurrentPageIndex + 1 ; LblPageInfo.Text = 'Page ' + pageindex.ToString() + ' of ' + DataGrid1.PageCount.ToString() ;
When I try to enter a null value for DataTime in Database I get error message ‘String was not recognized as a valid DateTime’ or ‘Value of type ‘System.DBNull’ cannot be converted to ‘String”
Use namespace System.Data.SqlTypes VB.NET Dim sqldatenull As SqlDateTime sqldatenull = SqlDateTime.Null If (txtDate.Text = '') Then cmd.Parameters('@Date').Value = sqldatenull ’cmd.Parameters('@Date').Value = DBNull.Value Else cmd.Parameters('@Date').Value = DateTime.Parse(txtDate.Text) End If C# if (txtDate.Text == '') { cmd.Parameters ['@Date'].Value =sqldatenull ; //cmd.Parameters['@Date'].Value = DBNull.Value; } else { cmd.Parameters['@Date'].Value = DateTime.Parse(txtDate.Text); }
How to open a browser window with maximum size on click of a button
VB.NET Button1.Attributes.Add('onclick', 'window.open(’page2.aspx’,’’,’fullscreen=yes’)') C# Button1.Attributes.Add('onclick', 'window.open(’page2.aspx’,’’,’fullscreen=yes’)');
What is the difference between CurrentCulture property and the CurrentUICulture property
CurrentCulture property : affects how the .NET Framework handles dates, currencies, sorting and formatting issues CurrentUICulture property : determines which satellite assembly is used when loading resources