Hi all,
i am trying to develope a web application using vb.net. In my application i have populated my Dropdownlist box using javascript.But when i am trying to save the selected value in button click event, it is taking as null value. i am not able to get the value for the selected item from that dropdownlist. Can anyone help me?
thank you
femin
Loading
sunithaPosted Oct 30, 2006, 8:09 AM
try this code in aspx.cs:
protected void Page_Load(object sender, EventArgs e)
{
DropDownList1.DataTextField =
"ContactID";DropDownList1.DataValueField =
"LastName";TextBox1.Text=DropDownList1.SelectedValue.ToString();
DropDownList1.DataBind();
}
Femin FrancisPosted Aug 29, 2006, 3:19 AM
oupoiPosted Aug 29, 2006, 2:59 AM
Femin FrancisPosted Aug 29, 2006, 2:04 AM
Dipen LamaPosted Aug 29, 2006, 12:53 AM
Femin FrancisPosted Aug 29, 2006, 12:39 AM
Thanks for replay.But i need solution .And i am populating the dropdown using ajax with out refreshing.And i cannot do this using autopost back property. Because i dont want to refersh my page.
My .net frame work is asp.net 1.1 version. So will i not be able to get that values in my application? can u please reply me..
oupoiPosted Aug 28, 2006, 11:39 AM