Welcome Guest Search | Active Topics | Sign In | Register

Dialog ContentUrl Options
Heidi
Posted: Thursday, June 28, 2007 2:56:08 PM
Rank: Newbie
Groups: Member

Joined: 6/28/2007
Posts: 6
Hi,

I was trying to use the ContentUrl to open a new page in the Dialog. When the new page loads I need two values, So I was setting the ContentURL to "PageUrl?Name1=Value1&Name2=Value2" and then using this code to grab the values.
Code: C#
String Name1Value = Request.QueryString.GetValues("Name1");

This worked fine if only passing one parameter, the value would be returned as "Value1". But when using two parameters, the Value for Name1 was being returned as "Value1~Name2=Value2". I tried my same code, from a link button and redirected and the request gets the values correctly, but it's not from Dialog's ContentUrl. So for now, I'm setting two Session variables and getting it that way, so I could continue with development. But I wanted to let you know that this was happening.

Thanks,
eo_support
Posted: Thursday, June 28, 2007 3:07:36 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,095
Hi Heidi,

Do you happen to use some code to create the query string? We tried to edit the ContentUrl property directly at design time and giving it two query string items and it worked fine. You can try that and see if it works, also check your version, ours is 2007.1.20.

Thanks
Heidi
Posted: Thursday, June 28, 2007 3:22:33 PM
Rank: Newbie
Groups: Member

Joined: 6/28/2007
Posts: 6
I'm doing:
Code: C#
Dialog1.ContentUrl = "PageName.aspx?Name1=Value1&Name2=Value2";

And then when the Page Loads I do:
Code: C#
String[] Name1Value = Request.QueryString.GetValues("Name1");

and the Name1Value = "Value1~Name2=Value2".

Should I be doing it differently? Right now I was just putting in actually values and it wasn't working, but in reality one of the values will be set by a variable. Is that something that can be done?

And I just updated my version this morning so I have 2007.1.20 as well.

Thanks!
eo_support
Posted: Thursday, June 28, 2007 3:28:50 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,095
I copied your code exactly as is and it shows me the correct result with Name1Value having one element of "Value1". Can you make a sample project for us?
Heidi
Posted: Thursday, June 28, 2007 3:40:13 PM
Rank: Newbie
Groups: Member

Joined: 6/28/2007
Posts: 6
Would it matter that I'm not using the showButton property? In the button click event, I'm making it visible with this code:
Code: C#
Dialog1.InitialState = EO.Web.DialogState.Visible;
eo_support
Posted: Thursday, June 28, 2007 3:44:18 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,095
No. It should not matter, we tried that as well. It would be appreciated if you can post a sample app that demonstrates the problem.
Heidi
Posted: Friday, June 29, 2007 7:48:23 AM
Rank: Newbie
Groups: Member

Joined: 6/28/2007
Posts: 6
Ok, well I guess I have to say I should have pulled my app apart before sending this to you. When I went to go make you a sample of the code, I found that it worked. So I slowly started adding things that I had on my page, and found that when I added the Dialog inside of an AJAX Update Panel is when it's goofs up the Query String for the Dialog. Can I ask you what is the difference between your Call back Panel and the AJAX Update Panel.

Thanks
eo_support
Posted: Friday, June 29, 2007 8:04:37 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,095
Hi Heidi,

The biggest advantage our CallbackPanel over AJAX Update Panel is that our CallbackPanel parse and execute inline Javascript rendered by controls. There are also a number of other differences which we consider to be easier to use than AJAX UpdatePanel. They both use triggers, so conceptually they are similar.

Our CallbackPanel also works on ASP.NET 1.1, while AJAX UpdatePanel only works on ASP.NET 2.0 and above.

Thanks
Heidi
Posted: Friday, June 29, 2007 11:05:52 AM
Rank: Newbie
Groups: Member

Joined: 6/28/2007
Posts: 6
Is it possible to have you look to see if there is something being done with the ContentUrl that would cause this issue when I'm using it in the AJAX update Panel. I've been doing some testing and other ASP.net controls and setting PostBackUrls and the AJAX Update Panel doesn't goof it up. It's just the Dialog and the AJAX Update Panel together. I have sample project, how would you like me to send it?
eo_support
Posted: Friday, June 29, 2007 7:26:17 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,095
Heidi wrote:
Is it possible to have you look to see if there is something being done with the ContentUrl that would cause this issue when I'm using it in the AJAX update Panel. I've been doing some testing and other ASP.net controls and setting PostBackUrls and the AJAX Update Panel doesn't goof it up. It's just the Dialog and the AJAX Update Panel together. I have sample project, how would you like me to send it?


Great. Could you email your sample project to us?
I will look into it and see what I can find.

Thanks.
eo_support
Posted: Monday, July 2, 2007 10:41:06 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,095
Hey, Heidi

I received your sample code and it does behave like what you said.
Looks like the reason is that AJAX Update Panel encoded the URL during its post back. It changed "&" to %7e, "=" to %3d.
I also tried our Callback Panel, it does not have any problem in our Callback Panel.
I don't have a good solution for this one at this moment. I tried to UrlEncode on the url string before it posts back, but it did not help at all.
I may come up with some workaround in this situation later if you have to use AJAX Update Panel. And I will let you know as soon as we have.

Thanks again and have a good week.



You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.