Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-09-23
3
Medium Priority
?
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 36

Accepted Solution

by:
Miguel Oz earned 668 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 664 total points
ID: 36594332
mas_oz2003 solution + server.transfer can perform with better performance
0
 
LVL 5

Assisted Solution

by:eridanix
eridanix earned 668 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

704 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