A simple question about FORM in ASP.NET

G

Guest

Hello All,

I have a very simple form as you can here. This form has one Textbox and
one Button named Download. In ASP after tying in the text box even if I hit
enter, the form was getting submitted but in ASP.NET this is not happening.
The form is not submitted until I click on the Download button. Can someone
tell me how I can change this so that after tying the text in the Textbox if
someone hits Enter, the form will be submitted? Please note I am using VB
and not C#.

Thanks,

Joe

<Form method="post" runat="server">
<TR>
<TD ALIGN="RIGHT" VALIGN="TOP" class="bodytext">Enter Filename:</TD>
<TD ALIGN="LEFT" class="bodytext">
<asp:TextBox id="fname" columns="50" runat="server" />
</TD>
</TR>
<TR>
<TD ALIGN="RIGHT"> </TD>
<TD ALIGN="LEFT" class="bodyText"><asp:Button id="button1" Text="Download"
runat="server" OnClick="Submit" /></TD>
</TR>
<TR>
<TD COLSPAN=2 class="bodytext"> </TD>
</TR>
</FORM>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top