How to programmatically set the width of the textbox control
VB.NET TextBox1.Width = Unit.Pixel(100) C# TextBox1.Width = Unit.Pixel(100);
How to clear all the textboxes in my form
VB.NET Dim ctl As Control For Each ctl In Page.Controls(1).Controls If TypeOf ctl Is TextBox Then CType(ctl, TextBox).Text = ” End If Next C# foreach (Control ctl in Page.Controls[1].Controls ) { TextBox tb = ctl as TextBox; if (tb!=null) { tb.Text = ” ; } } Note: Page.Controls[1]=> control is within the tag
How to align the Text property of the Textbox Control?
VB.NET TextBox1.Style(‘text-align’)=’right’ C# TextBox1.Style[‘text-align’]=’right’;
How to display only date part in the Datagrid if the Date is of DateTime datatype in the database
Set the DateFormatString as {0:d}
Why do I get the Columns twice in the datagrid. I am using BoundColumns and TemplateColumns in DataGrid
Set the AutogenerateColumns= False. By Default it is set to true for a datagrid