MVC2 Clientside Validation and duplicate ID's problem
Posted
by Dusty Roberts
on Stack Overflow
See other posts from Stack Overflow
or by Dusty Roberts
Published on 2010-04-20T13:50:08Z
Indexed on
2010/04/20
13:53 UTC
Read the original article
Hit count: 357
I'm using MVC2 with VS2010
I have a view that has two partial views in it: "Login" and "Register"
both partial views contains the Email address field i use the following in both partial views:
<%: Html.TextBoxFor(model => model.EmailAddress ) %><br /><%: Html.ValidationMessageFor(model => model.EmailAddress) %>
if i use both partial views on one page, it ends up having duplicate id's so validation happens across both views (even thopugh they are in seperate forms)
how can i go about eliminating this
© Stack Overflow or respective owner