1

I have this hidden input from HTML, which contain the value of the total number and display out once save is click. Like this:

<input id="hidden" runat="server" type="text" value="<% hidden %>" />

<asp:Button ID="save" runat="server" Text="Save" class="bottom" />

Behind of asp.page

Protected Sub save_Click(ByVal sender As Object, ByVal e As EventArgs) Handles save.Click

Dim str As String = Request.Form("hidden")

Response.Write(str)

End Sub

But it could not display the hidden value I wanted.

Celia
  • 15
  • 4

1 Answers1

0

You need to set name="hidden" in the input tag.

<input id="hidden" runat="server" type="text" name="hidden" value="<% hidden %>" />

See this question for more info: https://stackoverflow.com/a/976682/2671135

Community
  • 1
  • 1
Georg
  • 378
  • 1
  • 3
  • 10