Kriti

Kriti

  • NA
  • 60
  • 0

Populating a drop-down list

Dec 29 2009 3:14 AM

Hi Kirtan,
I did exactly as u said..doing sum minor changes..In the code behind also I have done the changes as said but as u wrote div should be placed just before drop-down code but instead of doing dat,I have put it in the beginning of the page.
<ItemTemplate>
<asp:HiddenField ID="HiddenField1" runat="server" Value="" />
            <asp:DropDownList id="dd" runat="server" onselectedindexchanged="dd_SelectedIndexChanged" AutoPostBack="True">
            <asp:ListItem Value="Pending">Pending</asp:ListItem>
        <asp:ListItem Value="Yes">Yes</asp:ListItem>
        <asp:ListItem Value="No">No</asp:ListItem>
       </asp:DropDownList>
</ItemTemplate>
I have put form and div at the begining of my page in this sequence
<body>
<form>
<div>
//many text boxes, button etc
//dropdowncode
</div>
</form>
<script>
//function confirmIt() goes here
</script>
</body>
but now when m bulilding the code its giving error as-
The name 'RegisterClientScriptBlock' does not exist in the current context
The name 'HiddenField1' does not exist in the current.
Do i need to import sumthin in the cs code and how to get the values of hidden field.U can refer to my previous thread for detailed info.

Answers (4)