Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Design problem

Status
Not open for further replies.

markros

Programmer
May 21, 2007
3,150
US
Hi everybody,

I have a complex People page that shows every active person in the database. The page allows to search and specify select criteria using SQLWhereBuilder control. This page also has several image buttons such as Create Excel list, View Communication Log, E-Mail to the selected people, etc.

Some of these buttons only use JavaScript code to open new page with parameters. The functionality of these new pages depends on the dataset being stored in a session.

So, our current implementation is to always create a dataset and store it in a session with this code in Page_Load

Code:
SqlConnection Conn = new SqlConnection(
            System.Configuration.ConfigurationManager.ConnectionStrings["FCCMSConnectionString"].ConnectionString);
            
            DataSet ds = new DataSet();
            SqlDataAdapter da = new SqlDataAdapter
                (@" Actual Complex Select Statement", Conn);

            Conn.Open();           

            da.Fill(ds);
            Session.Add("dts", ds);
            Conn.Close();

However, I believe that this solution is too server resources expensive. Besides, when we added this code to the People page the Delete functionality in the GridView stopped working for some reason (it was working fine before).

I believe we only need to create this huge dataset and store it in a session if any of the buttons is clicked.

However, since some of these buttons only use JavaScript code I don't see a simple way to resolve this problem. May be this could be somehow solved using AJAX?

Any ideas are greatly appreciated.

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top