How to retreive window.showModalDialog dialogArguments in C# code?

G

Guest

I am creating a modal dialog box in ASP.NET via client-side javascript and
passing vArguments parameters in an array form using this syntax:

vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])


when the modal dialog box comes up, I would like to retreive the vArguments
parameters in C# upon Page_Load, How can I do this?
 
N

Nicholas Paldino [.NET/C# MVP]

You would have to force a postback to the page (or use javascript to
make an XML request under the covers) passing that value to your C# page.
This would cause the page to reload (using the former suggestion).
Basically, you would have to create a hidden input field in the form, then
submit the form.

Hope this helps.
 
G

Guest

I had this in-mind but wasn't sure if there is a namespace that already
provides function to do this in C#.

Thanks

Nicholas Paldino said:
You would have to force a postback to the page (or use javascript to
make an XML request under the covers) passing that value to your C# page.
This would cause the page to reload (using the former suggestion).
Basically, you would have to create a hidden input field in the form, then
submit the form.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

conraba said:
I am creating a modal dialog box in ASP.NET via client-side javascript and
passing vArguments parameters in an array form using this syntax:

vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])


when the modal dialog box comes up, I would like to retreive the
vArguments
parameters in C# upon Page_Load, How can I do this?
 
G

Guest

conraba said:
I am creating a modal dialog box in ASP.NET via client-side javascript and
passing vArguments parameters in an array form using this syntax:

vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])


when the modal dialog box comes up, I would like to retreive the
vArguments
parameters in C# upon Page_Load, How can I do this?

Why don't you pass vArguments as query string parameters in the url to your
dialog page?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top