hi all,
This is my code, which give me an error of "name" is not declared
Code for WebForm1.aspx
The name is my input id, how to pass the value?
This is my code, which give me an error of "name" is not declared
Visual Basic:
'code for WebForm1.aspx.vb
Sub submit(ByVal sender As Object, ByVal e As EventArgs)
If name.value <> "" Then
p1.InnerHtml = "Welcome " & name.value & "!"
End If
End Sub
Code for WebForm1.aspx
Visual Basic:
<form runat="server">
Enter your name: <input id="name" type="text" size="30" runat="server" />
<br /><br />
<input type="submit" value="Submit" OnServerClick="submit" runat="server" />
<p id="p1" runat="server" />
</form>