Z
zoneal
I am working on an application that displays a grid with dropdownboxs
in various parts of this grid. Now the entire gird is generated
dynamically based on user interaction, so i have put the code required
to generate this grid in an .ascx file. Here is my problem:
My grid is generating perfectly, but I am stuck on this on part: I
currently have the functionality that is the user changes an item in
any of the dropdowns, the form will postback to itself, however, i am
unable to get the selectedIndex.Text or Value.
first let me share with you how i create the drop downboxes:
hwriter.WriteBeginTag("select")hwriter.WriteAttribute("name",
i.ToString)hwriter.WriteAttribute("OnChange", " " &
Page.GetPostBackEventReference(Me,
Me.UniqueID))hwriter.Write(HtmlTextWriter.TagRightChar)hwriter.WriteBeginTag("option")hwriter.WriteAttribute("value",
"ins~" & intUsers(i).ToString & "~" & intLinkId.ToString & "~" &
dt.Rows(x).Item("roleValue"))hwriter.WriteAttribute("selected",
"selected")hwriter.Write(HtmlTextWriter.TagRightChar)hwriter.Write(dt.Rows(x).Item("name"))hwriter.WriteEndTag("option")
The way the above code is laid out, when a postback occurs, my
eventArgs is the value of: 'Me.UniqueID' which does me no good. I have
looked through my VS.Net help files and there are examples on how to do
this with button and raising the click event, I can not duplicate this
for the onChange event??? Any help as to how I can get the values of
the selected item would be greatly appreciated
in various parts of this grid. Now the entire gird is generated
dynamically based on user interaction, so i have put the code required
to generate this grid in an .ascx file. Here is my problem:
My grid is generating perfectly, but I am stuck on this on part: I
currently have the functionality that is the user changes an item in
any of the dropdowns, the form will postback to itself, however, i am
unable to get the selectedIndex.Text or Value.
first let me share with you how i create the drop downboxes:
hwriter.WriteBeginTag("select")hwriter.WriteAttribute("name",
i.ToString)hwriter.WriteAttribute("OnChange", " " &
Page.GetPostBackEventReference(Me,
Me.UniqueID))hwriter.Write(HtmlTextWriter.TagRightChar)hwriter.WriteBeginTag("option")hwriter.WriteAttribute("value",
"ins~" & intUsers(i).ToString & "~" & intLinkId.ToString & "~" &
dt.Rows(x).Item("roleValue"))hwriter.WriteAttribute("selected",
"selected")hwriter.Write(HtmlTextWriter.TagRightChar)hwriter.Write(dt.Rows(x).Item("name"))hwriter.WriteEndTag("option")
The way the above code is laid out, when a postback occurs, my
eventArgs is the value of: 'Me.UniqueID' which does me no good. I have
looked through my VS.Net help files and there are examples on how to do
this with button and raising the click event, I can not duplicate this
for the onChange event??? Any help as to how I can get the values of
the selected item would be greatly appreciated