开发者

userControl repeated with Form tag disappearing

开发者 https://www.devze.com 2023-04-12 13:14 出处:网络
I have a Contact userControl that have \"save contact\" as submit button and fields inside form tag we repeat this userControl with Code 20 times in one page

I have a Contact userControl that have "save contact" as submit button and fields inside form tag we repeat this userControl with Code 20 times in one page

My problem is the Form Tag in the first userControl is hiding somehow 开发者_如何学C--- i checked the userControl with developer Tool IE9 , firebug Firefox7 and the Form is not appearing in the first userControl and its appearing with the rest 19 Controls

I tried to View Source and take html copy in new html file in VS -- i found form is exist

i dont know if iam clear enough but please advice if you need more info


If you're running a form tag at the server, inside a user control, and then displaying this user control more than once on the page, then you will have multiple form tags running at server on one page, which is not allowed by ASP.NET

Take the form tag outside of the user control like:

<form runat="server">
  <uc:Contact />
  <uc:Contact />
  <uc:Contact />
</form>
0

精彩评论

暂无评论...
验证码 换一张
取 消