protected void Page_Load(object sender, EventArgs e)
{ FindFirstTextBox(this); }
private bool FindFirstTextBox(Control ctl)
{ bool foundControl = false;
foreach (Control child in ctl.Controls)
{
if (child is TextBox)
{
[...]
Archive for February, 2007
Place Cursor in the First Input Box Automatically
Posted in Favorites on February 5, 2007 | Leave a Comment »
how to get multiselected from listbox in asp.net
Posted in asp.net 2 on February 1, 2007 | 1 Comment »
we Select multiple indices from list boxes . the listbox have propery of GetSelectedIndicdces . Which return all selected indexes .
so code is like
int[] _SelectedIndexes = lstBlog.GetSelectedIndices();
foreach (int Y in _SelectedIndexes)
{ Response.Write(this.lstBlog.Items[Y].Text + ” “ + this.lstBlog.Items[Y].Value );
} where lstBlog is name of listbox