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.
<asp:HiddenField ID="HiddenField1" runat="server" Value="" />
I have put form and div at the begining of my page in this sequence
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.

Rekha SinghRank #1,571 · 1K reputationPosted Dec 29, 2009, 1:24 AM EST
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Pagetitle>
head>
<body>
<form>
<div>
<ItemTemplate>
<asp:HiddenField ID="HiddenField1" runat="server" Value="" />
<asp:DropDownList id="dd" runat="server" onselectedindexchanged="dd_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem Value="Pending">Pendingasp:ListItem>
<asp:ListItem Value="Yes">Yesasp:ListItem>
<asp:ListItem Value="No">Noasp:ListItem>
asp:DropDownList>
ItemTemplate>
I have put form and div at the begining of my page in this sequence
//many text boxes, button etc
//dropdowncode
div>
form>
<script>
//function confirmIt() goes here
script>
body>
html>
*****************************************
Please mark it Accepted if u find it helpful.
Kirtan PatelRank #292 · 8.6K reputationPosted Dec 29, 2009, 1:44 AM EST
Sorry if i have miss typed in the code i have sent
you need to Write
Page.RegisterClientScriptBlock("" ,"");
then it will be fine :)
check "Do you like this answer" check box if it helps you :)
Thanks
Kriti54 reputationPosted Dec 29, 2009, 1:54 AM EST
that's working fine..
but this error is coming now also-The name 'HiddenField1' does not exist in the current,though i have put hidden field in the body tag.What could be the possible soln?
Kirtan PatelRank #292 · 8.6K reputationPosted Dec 29, 2009, 4:06 AM EST
Check my reply here for final Working Code !!
http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=74912
Thanks :)
if my answer helped you then please check "Do you like this answer" check box :) there :) it will help me :)