skip to main
|
skip to sidebar
DOUBT Corner
Home
.NET
SQL
Your Query
Contact
How to clear selected item dropdownlist in asp.net c#
Post under
ASP.Net
for example runtime dropdown list selected item you want clear put below coding aspx.cs page
protected void Button3_Click(object sender, EventArgs e)
{
DropDownList1.SelectedIndex = -1;
DropDownList2.SelectedIndex = -1;
}
read more...
How to show message box in asp.net
Post under
ASP.Net
Where you want Your Messagebox Put Below Lines in your coding Page(aspx.cs)....
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(
"<script>alert('Your Text...');</script>"
);
}
if click button1 this message will display.....
read more...
How to validate textbox to accept only numeric value in C#.net
Post under
Windows
,
Windows forms
Below Coding for accept only Numbers.....
if ((e.KeyChar < 48 || e.KeyChar > 57) && e.KeyChar != 8)
{
e.Handled = true; // Remove the character
MessageBox.Show("Please Enter No only...");
}
read more...
How to clear selected item in combobox in c#
Post under
Windows
,
Windows forms
For Windows Application We Want to Paste Below Lines
combobox1.selectedIndex = -1;
read more...
How to validate textbox to accept only characters in windows form
Post under
Windows
,
Windows forms
Below Coding TextBox Accept only Characters....
if ((e.KeyChar >= 65 && e.KeyChar <= 90) || (e.KeyChar >= 97 && e.KeyChar <= 122) || (e.KeyChar == 32) || (e.KeyChar == 8)) //keychar 8 is for backspace
{
e.Handled = false;
}
else
{
e.Handled = true;
MessageBox.Show("Please Enter Character Only...." );
}
read more...
Newer Posts
Home
Subscribe to:
Posts (Atom)
Blog Archive
Blog Archive
December (10)
My Visitors
Feedjit Live Blog Stats
Follow Me
Categories
ASP.Net
(4)
SQL
(1)
Windows
(4)
Windows forms
(4)