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

[Solved] Passing Parameters to Generic Window

3 Answers 245 Views
Window
This is a migrated thread and some comments may be shown as answers.
JPero
Top achievements
Rank 2
JPero asked on 24 Apr 2008, 08:25 PM
Just started using the radwindow and I was looking for some general info.
Here's the scenario: Creating a generic dialog for any page to use. The idea is that the calling page would send in some parameters, and the generic dialog would load up it's data and behaviors based on those parameters. I have n number of parameters to send up so I'm shying away from querystring.
I found the arguement property of the window, but the problem is that i need these values on the server side on load so I can bind everything correctly.

The only thing i can think of is to do load the arguement values into some hidden's and then do another postback right away, to force a kind of double post on init, but ...ehh.

Is there a clean way to access the window's arguements on the server side on the window's first load? Thanks in advance for any help.

3 Answers, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 25 Apr 2008, 01:37 PM
You should pass parameters through the RadWindow url.
Take a look at this example:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Window/Examples/UsingURLForServerArguments/DefaultCS.aspx
I hope that it will helps you.
0
JPero
Top achievements
Rank 2
answered on 25 Apr 2008, 02:05 PM
With n parameters, space would be a factor. I've heard that IE 6 has a 2,047 character limit (haven't tested myself).

Regardless, I know there's a few alternative ways to get the data there, but I wanted to check first to see if there was anything like the client side 'Arguements' property available on the server side.
0
Accepted
Tervel
Telerik team
answered on 29 Apr 2008, 07:11 AM
Hi JPero,

The problem you are facing is a general programming issue. You should think of the RadWindow object as nothing other than a moveable IFRAME or a browser window created with window.open. There are two ways to provide arguments from the client to the server - using a GET or a POST, e.g. - sending the arguments in the window URL, as suggested in the forum thread - or, alternatively, loading the page into the window, setting some hidden field variable and performing a postback or AJAX call to the server.

In any case, first implementing your scenario with a simple IFRAME or with window.open and then just replacing the frame/window with a RadWindow will get things working for you.


Greetings,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
JPero
Top achievements
Rank 2
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
JPero
Top achievements
Rank 2
Tervel
Telerik team
Share this question
or