Passing variable in WebServiceDataSourceSettings Select url

1 Answer 259 Views
Grid UI for ASP.NET AJAX in ASP.NET MVC
Jorge
Top achievements
Rank 1
Jorge asked on 28 Apr 2021, 05:04 PM | edited on 28 Apr 2021, 05:32 PM

Hi,

I'm using RadClientDataSource to grab data from an api endpoint but I need to pass a variable inside the url but can't figure out how.

<script language="VB" runat="server"> Dim id As String = HttpContext.Current.Request.QueryString("id") </script> <WebServiceDataSourceSettings> <Select Url="http://localhost:5000/api/v1/test/<%=id%>/cars" RequestType="Get" /> </WebServiceDataSourceSettings>

 

Rui
Top achievements
Rank 1
commented on 28 Apr 2021, 05:33 PM

It is urgent .. if someone can help
Attila Antal
Telerik team
commented on 03 May 2021, 03:08 PM

Hi Rui,

Check out the instructions from my Answer to Jorge's question.

For urgent cases, be sure to submit a formal support ticket. That way you will get an answer within guaranteed 24 hours.

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 03 May 2021, 10:09 AM

Hello,

You can try the instructions from the Passing data to the server article to pass additional data to the server or you can customize the parameters using the OnCustomParameter Event of the RadClientDataSource.

Both ways you will be able to send the ID to the server.

Regards,
Attila Antal
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Tags
Grid UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Jorge
Top achievements
Rank 1
Answers by
Attila Antal
Telerik team
Share this question
or