Y
yasodhai
Hi,
I used a dropdown control which is binded to a datagrid control. I
passed the values to the dropdownlist from the database using a
function as follows in the aspx itself.
<aspropDownList ID="FldType_add" Runat="server" DataSource='<
%#GetFieldType()%>' DataValueField="Type" DataTextField="Type" />
Oce the page is loaded all the values are added to the dropdown list.
But when I thought of getting the selected value from the dropdown
list, I am getting the following error while assigning the value to a
local variable called Fldstr.
DropDownList
Fldlist=(DropDownList)e.Item.FindControl("FieldType_add");
string Fldstr=Fldlist.SelectedItem.Value;
Here FieldType_add is the id of the dropdown list form which i am
going to retrieve the selected value. Kindly help me to come out from
this.
Regards,
Yasodhai
I used a dropdown control which is binded to a datagrid control. I
passed the values to the dropdownlist from the database using a
function as follows in the aspx itself.
<aspropDownList ID="FldType_add" Runat="server" DataSource='<
%#GetFieldType()%>' DataValueField="Type" DataTextField="Type" />
Oce the page is loaded all the values are added to the dropdown list.
But when I thought of getting the selected value from the dropdown
list, I am getting the following error while assigning the value to a
local variable called Fldstr.
DropDownList
Fldlist=(DropDownList)e.Item.FindControl("FieldType_add");
string Fldstr=Fldlist.SelectedItem.Value;
Here FieldType_add is the id of the dropdown list form which i am
going to retrieve the selected value. Kindly help me to come out from
this.
Regards,
Yasodhai