Note that there are some explanatory texts on larger screens.

plurals
  1. POPop Up Window Data Variable Passing
    text
    copied!<p>I am creating a web application for my company that needs to deal with form processing and database manipulation. The application is implemented using .NET Framework 3.5 using C# and Visual Studio 2008 as the IDE and Microsoft SQL Server 2005 as the database.</p> <p>Here is my problem:</p> <ol> <li><p>I have a <strong>lot of forms</strong></p></li> <li><p>But my boss only want me to create <strong>a single page for the database processing</strong> (easier to extend in the future)</p></li> </ol> <p>I figured out the only way to solve this problem is by having only 1 .aspx file (that contains everything about the database) and having it invoked as a pop up window everytime a forms need to deal with the database.</p> <p>Here is another problem of mine:</p> <ol> <li><p>Due to stateless nature of HTTP, I am <strong>unable to process and pass variable</strong> between 2 different windows.</p></li> <li><p>I managed to create certain Javascript functions and have the variable transferred on display, however it can only pass a variable that is the primary key in the table. To process other columns in the table is possible but as the consequence I have to write a very long inline script in my .aspx page and after it is compiled people can easily view how to access my company database easily. Hence, I don't favor this (beside to deal with 1 form, I need to create a long code already, imagine if i have more than 1000 forms!)</p></li> </ol> <p>So there are two ways you guys can help me:</p> <ol> <li><p>Suggest another way other than popping up a new window for my problem, maybe even advise on how it's implemented.</p></li> <li><p>If you think popping up is the solution, you mind to <strong>share some snippets that can help me figure out the variable passing between two different windows</strong>. I can use some advise especially from some Javascript expert on this :).</p></li> </ol> <p>Note: Solution must be workable in ASP.NET Framework 3.5 and tested using IE browser version: 8.</p> <blockquote> <p>P.S: This is a short explanation about my application flow</p> <ol> <li><p>Let's say I entered data about a product (it has few properties id, name, price, etc) into the database</p></li> <li><p>Later on somehow I want to edit one or few properties of that product, so I have to launch a form which called "editor.aspx"</p></li> <li><p>Instead of entering the product id (which is the primary key) into the form (and edit the data based on the entered product id) and risking to miscalculately edit the correct data, I provide a small button in the form (let's name it btSearch), that will launch a new popup window which contains the gridview of the database of all product (with selection enabled)</p></li> <li><p>Now I just need to browse through the gridview, select a particular row, it will close the popup and I expect to see few data from that row appeared on my original page (in the textboxes/labels)</p></li> </ol> </blockquote> <p>I hope my explanation above clears the air, thank you.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload