Forum  General Visual ...  How do I...?  dynamic Link.Open
Previous Previous
 
Next Next
New Post 2/1/2012 3:56 PM
  gusgran
13 posts
No Ranking


dynamic Link.Open  
Modified By gusgran  on 2/1/2012 7:57:39 PM)

Hi Gents, How can I make a dynamic Link.Open to have individual instances?

I have a dynamic Link opening orders in a new Tab (or page), all works fine when open the first order, but when the user select another order the link open correctly the page but after few seconds all pages already open refresh to the last order (seems all pages run under same instance).

Code to open: Link.Open("Post.Order.wgx?ref=" + oLookingForOrder);

Every page render like this: …/Order.wgx?vwginstance=0

Any ideas?

 
New Post 2/4/2012 3:41 AM
  palli
14295 posts
1st Level Poster




Re: dynamic Link.Open  

Hi gusgran,

This is by design, and the reason is that both/all your forms are using the same vwginstance and hence they are using the same instance of the form class.

You can easily make this work by defining a static counter on your form and then issuing something like this:

            instance++;
            Link.Open(string.Format("post.Form1.wgx?Order={0}&vwginstance={1}",order, instance));

This will force the creation of a new vwginstance and hence a new instance of your form class.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 2/5/2012 10:27 PM
  gusgran
13 posts
No Ranking


Re: dynamic Link.Open  
Perfect Palli It’s will work well, thanks for the sample. Cheers, Gus
 
New Post 2/10/2012 3:20 PM
  palli
14295 posts
1st Level Poster




Re: dynamic Link.Open  

Hi Gus,

You are welcome.

Glad it worked for you and thanks for confirming.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  General Visual ...  How do I...?  dynamic Link.Open
.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