Any suggestions on how to pass values to the dialog? Something either like a querystring value or a property?
The DialogWindow is actually an element on the same page as the rest of your controls, so it's not necessary to "pass" data back and forth.
Hope this helps,
-Tony
Hi Tony,
Thanks for responding, guess I should I have put more content in the initial post. I had just typed up this post titled before this one "ContentURL to another aspx page, how to close dialog ... " I've figured this out already.
So my initial thought was to make a generic page that would contain the WebDialog and then reuse the control without putting it on every page I wanted to use it in.
To accomplish this the generic page would have to have ability to dynamically change the dialog message, the OK button would have to dynamically know how to callback to the calling page to finishing processing what OK meant. Cancel button would need to callback to calling page so the generic dialog window could be closed. Seems like it could be a little cumbersome and prone to errors easily.
Perhaps at a high level you might have some thoughts on how to accomplish the dynamic portions of the request.
Thanks ... Chad
Chad,
Your best bet is to put the Dialog on it's own page, and crosspost to it. The reason I recommend posting is because your data may exceed the limitations on an HTTP GET. However, if you can use an HTTP GET to encode your data this because a simple task of creating a hyperlink and setting the href = "mydialog.aspx?encodedparams=...."
If you want to use a form post, it becomes a little more complex, but not overly complicated. You'll want to have a form element with it's target set to _blank, that way it opens the response in a new window. You'll also want the action of the form to point to your dialog page. You can dynamically modify the target and action properties of the form element in your page, so that may be the way to go.
Thanks for the advice. Good point about the size limitations in the GET. I'll keep plugging away.