Solved

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

Posted on 2011-09-23
3
223 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 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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