in my page i have a code like this"
while running the page i am getting some value here..i want to save that value in my sql server database..so i want to take that value in my code behind page..i tried code something like this
but i am getting empty string.what is wrong with my code?? how i can find out the corresponding span id value in my code behind..
Thanks in advance
Code:
<td>
<span>Sex: </span>
</td>
<td>
<span id="Sex_PDLabel" runat="server"></span>
</td>
Code:
Dim div As HtmlGenericControl = CType(FindControl("Sex_PDLabel"), HtmlGenericControl)
Dim s As String = div.InnerText
Thanks in advance