Forum  Core :: SDK (Vi...   How do I...?  Passing Query String
Previous Previous
 
Next Next
New Post 5/14/2009 3:45 AM
Resolved
  Revanth
10 posts
No Ranking


Passing Query String 
Modified By Revanth  on 5/15/2009 2:43:00 AM)

 

Hi !

I can able to pass a Query String from Form1.wgx to .aspx (asp.net) page and i can able to retrieve in .aspx(asp.net) page by using th intermediate page concept(http://visualwebgui.com/Developers/Forums/tabid/364/forumid/29/threadid/21194/scope/posts/Default.aspx)

But, i can not able to pass and retrieve  the Query String from VWG Form to another VWG Form .

and also , i can not able to retrieve the Query String in VWG Form  from aspx page.

I have tried so many scenarios as follows;

I am passing a Query String from asp.net application as follows:

 

str = "QSisFromASPNET";

Response.Redirect(

 

In debug mode i am getting the URL as http://localhost:2292/VWG_Validations/VWGForm2.aspx?TransactionUID=QSisFromASPNET   for this URL

1.Context.HttpContext.Request.QueryString is coming as {vwginstance=}
2.Context.HttpContext.Request.QueryString.GetKey(0) coming as "vwginstance"

3.Context.HttpContext.Request.UrlReferrer is coming as {http://localhost:2292/VWG_Validations/Form2.wgx?vwginstance=&vwgstateless=0}

4.Context.HttpContext.Request.RawUrl is coming as "/VWG_Validations/Route/1.89.1/ie/en-US/Default/Init.Form2.wgx?vwginstance="

5.System.Web.HttpContext.Current.Request.Url is coming as {http://localhost:2292/VWG_Validations/Route/1.89.1/ie/en-US/Default/Init.Form2.wgx?vwginstance=} 

6.System.Web.HttpContext.Current.Request.QueryString is coming as {vwginstance=} 

 but i am not getting "TransactionUID" as query string.

please help me in this issue.

Thanks in advance.

Revanth

 

 

"VWGForm2.aspx?TransactionUID=" + str + " ");

string


Revanth
 
New Post 5/15/2009 1:29 PM
  palli
14323 posts
1st Level Poster




Re: Passing Query String 

Hi Revanth,

Your code didn't format property, but I think I get your point.

The trick here is to use the "post" prefix when calling your VWG apps. See this thread here for more explaination.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 5/20/2009 3:21 AM
Accepted Answer 
  Revanth
10 posts
No Ranking


Re: Passing Query String 

 palli wrote

Hi Revanth,

Your code didn't format property, but I think I get your point.

The trick here is to use the "post" prefix when calling your VWG apps. See this thread here for more explaination.

Palli

 

I have gone through that Thread, but i didn't get the solution.I think my case is little different,

i want to pass a Query String from asp.net page to  VWG Page.I ahve integrated the Form1 with asp.net.

In asp.net (Default.aspx)button click i have written the following code

string str="QueryStringFromASP.NET"

Response.Redirect("VWGForm2.aspx?TransactionUID="+  str + "  ");

I have integrated Form1.wgx in VWGForm2.aspx as follows.

<%@ Register Assembly="Gizmox.WebGUI.Forms" Namespace="Gizmox.WebGUI.Forms.Hosts" TagPrefix="vwg" %>

<vwg:FormBox id="vwgvalidations" runat="Server" Form="Form1" Height="100px" Width="100px"></vwg:FormBox>

Now i want to retrieve the str from default.aspx into VWGApplication i.e.VWGForm2.aspx(Whis is been integrated with Form1.wgx).

I have tried all the scenarios which they have mentioned in that Thread, i am getting Object Reference not set to instance of an Obect error. In debug mode, under Quick Watch i am getting the QueryString Key as "vwginstance" instead of "TransactionUID".

Can you please help me and provide me the sample code.

Thanks in advance.

 


Revanth
 
New Post 5/24/2009 4:29 AM
  ori.cohen
4401 posts
1st Level Poster




Re: Passing Query String 
Modified By ori.cohen  on 5/24/2009 7:30:44 AM)

Hello,

I think that the better thing to go in this case is work with session variables.
You would initialize a session variable in the ASP.NET application, redirect to VWG and read the value of the variable in VWG.
Rememer to 'Remove' the session variables, the moment you no longer need them.

Please tell me if this solution would help.

Regards,

Ori Cohen
Support Manager, the Visual WebGui team

 
New Post 5/25/2009 11:27 PM
  Revanth
10 posts
No Ranking


Re: Passing Query String 

Thanks to your great help. Using session it is working fine.

But, i think to pass a single variable, using Session and clearing session is a tedious task(ofcourse its not a difficult task).Is there any other way to pass and retrieve Querystrings to and from the VWG and ASP.NET applications.

Thanks in advance

 


Revanth
 
Previous Previous
 
Next Next
  Forum  Core :: SDK (Vi...   How do I...?  Passing Query String
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS