TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
J D
NA
1
0
Getting control name like ClientID for use in JQuery
Jun 15 2010 7:36 AM
I am working on setting up validation with JQuery in my .Net code. I got some things working, but cant figure this 1 out.
The following code shows how to set a simple rule to an input field called agree i JQuery.
$("#MainForm").validate({
rules: {
agree: "required"
}
});
My problem is that its the fields name which is needed and not the ID. The field IDs and names change with the control tree in .Net
They arent the same on every load.
I can get the ID assigned to a control with <%=TxtInvoiceAddress2.ClientID%> but I need to get the name to set the rule up.
Hope someone can help me figure out a way to setup JQuery rules to .Net Controls
Reply
Answers (
0
)
ADO.NET Entity Data Model template is missing
Switch between running applications