Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I thought I was doing fine converting my old ASP pages to .NET but now I have ran into a problem and need guidance!

 

I have a UserControl (called header.ascx) with a Web Form tag in it (<form id="frmSearch" runat="server">). Now one of my aspx page which shows the user control also has a form tag in it. I would like to use a server-side form tag there also but when I compile I get the error that there can only be one server-side form tag. This stinks!! What is the best thing for me to do here? Do I need to re-do my header.ascx file?

 

Thanks

Posted

I get the following error in my header.ascx.vb file when I remove it:

 

frmSearch.Attributes.Add("onsubmit", "return chkSearch(this)")

 

I probably shouldn't try to add the onsubmit to the form right? This is a javascript for validation I run after the user click the search button:

 

<input type="image" src="/_images/header_go.gif" alt="Search">

 

 

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...