This is a migrated thread and some comments may be shown as answers.

Using $find issue in MVC

1 Answer 43 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 17 Dec 2009, 10:10 PM
Hello,

Using the RadControl helper to create a date picker.  I'm also using script to do this:

var comp = $find("<%= StartDate.ClientID %>");

Similar to what you would do in ASP.NET web forms.  But I get an error.  So I took it out and inspected the markup, and I couldn't find a StartDate element, so I don't know if that is also contributing to the error.

Any ideas for handling this?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 23 Dec 2009, 10:03 AM
Hi Brian Mains,

To find the client object of specified radcontrol you will need to pass the id of the component to the $find method. In the case when you are using Html.RadControl<T>() method you set id of the control into Func. The defined id is the one you should use when you are looking for the client object.

I have attached a test project which shows how to achieve your goal.

Kind regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or