I dynamically create tabs which then have pageviews attached to them which use a ContentURL. When the user clicks on the submit button on the main page I want to be able to save user input in textboxes in the various pageviews. I have seen examples which demonstrate tabs being filled with usercontrols and then using the FindControl function to get to textboxes. How can I find textboxes in PageViews created with ContentURL?
This is how I load my pageviews.
This is how I load my pageviews.
Private Sub AddPageView(ByVal pageViewID As String, oTab As RadTab, sURLNav As String)
Try
Dim pageView As RadPageView = New RadPageView
pageView.ID = "PV" + pageViewID
oTab.PageViewID = "PV" + pageViewID
pageView.Height = 520
pageView.ContentUrl = sURLNav
MainMultiPage.PageViews.Add(pageView)
Catch ex As Exception
End Try
End Sub
5 Answers, 1 is accepted
0
Hello Lynne,
Thank you for contacting Telerik Support.
Since the set in the ContentUrl property page is loaded in an iframe, you cannot get direct access to the nested controls. I would suggest you to expose the needed controls with a function and access them from the iframe's ContentWindow. I have prepared sample page for you demonstrating the above suggestion. Please find it attached and let me know if it works properly at your end.
Hope this would help. I will be glad to assist you any further.
Regards,
Nencho
Telerik
Thank you for contacting Telerik Support.
Since the set in the ContentUrl property page is loaded in an iframe, you cannot get direct access to the nested controls. I would suggest you to expose the needed controls with a function and access them from the iframe's ContentWindow. I have prepared sample page for you demonstrating the above suggestion. Please find it attached and let me know if it works properly at your end.
Hope this would help. I will be glad to assist you any further.
Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Lynne
Top achievements
Rank 1
answered on 29 May 2013, 08:01 PM
Thanks so much! I have tried your sample project and it worked. Is there a way on the server side to get the data? Can this only work on the client side? I would like to use the code behind for the submit button on the main page to get the values of the textboxes in the pageview that has a contentURL.
0
Hello Lynne,
You could use a HiddenField to store the needed data and access it at server-side when needed. I have slightly modified the previously provided sample, in order to demonstrate this approach. Please find the attachment.
Regards,
Nencho
Telerik
You could use a HiddenField to store the needed data and access it at server-side when needed. I have slightly modified the previously provided sample, in order to demonstrate this approach. Please find the attachment.
Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Lynne
Top achievements
Rank 1
answered on 19 Jun 2013, 07:43 PM
Thanks! That was very helpful.
I actually get a lot of data from the user which is in a table and I want to add the table to a pageView on the clientside. If were doing this on the server side I could use the following code:
pageView.Controls.Add(DefaultTable)
However, I don't know how to do this on the client side.
0
Hi Lynne,
One possible approach that you can use is to set the content url (that will point to the page containing the table) of the RadPageView on the client side using the following code pageview.set_contentUrl("someurl"); as explained here.
Regards,
Kate
Telerik
One possible approach that you can use is to set the content url (that will point to the page containing the table) of the RadPageView on the client side using the following code pageview.set_contentUrl("someurl"); as explained here.
Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.