Solved

How to Dynamically Build Another Web Page From Another ASP.NET/C# ASPX page

Posted on 2011-09-23
3
198 Views
Last Modified: 2012-05-12
I have successfully built a website that allows users to query a database and a series of ten values are returned from selection criteria that a user has entered. I am now attempting to write the line of values that are in a dataset within C# that has successfully queried the database table. (The results can contain thousands of results, and all of the results need to be displayed in a table format on another web page.)

I am new to C# and ASP.NET, and I was wondering if someone could point me in the right direction of how to take the data that I have on one page and dynamically build another aspx page, which will have its own controls on it, in a table format. Thank you to anyone in advance that can help me find direction with my current web page project.

(For simplicity, say that I used table1 and pulled back values a, b, c, d, e, f, g, h, i, j, k. How can I get the values in table1 being returned in the dataset to display in a table on a webpage called results.aspx from an original aspx page called default.aspx.)
0
Comment
Question by:thenthorn1010
3 Comments
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 167 total points
ID: 36590433
Try saving you dataset result into the session object.
Session["MyCommonDataset"] = your_dataset_ instance_ here.
Then use the same session on both pages to build the contents.

Check:
http://www.codeproject.com/KB/aspnet/ExploringSession.aspx
0
 
LVL 15

Assisted Solution

by:Eyal
Eyal earned 166 total points
ID: 36594332
mas_oz2003 solution + server.transfer can perform with better performance
0
 
LVL 5

Assisted Solution

by:eridanix
eridanix earned 167 total points
ID: 36707854
Hi,

why don't you get results of the query on the second page?

For example:
1)On page1.aspx users fill their selection criteria and click on submit button. The form on page1.aspx will have action set to page2.aspx and method post.
2)On page2.aspx get select criteria by Request.Form, do database query database to select data and view data as you need.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
crm development 2 37
COnsume rest client 6 12
XML & .net 5 20
Cannot upload files above 1mb IIS7 11 15
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now