Author |
Topic |
svgeorge
Starting Member
23 Posts |
Posted - 2007-08-28 : 13:46:11
|
how do I creating temperory table to store selected data from User interface web page and display them on next page on clicking Button |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-28 : 14:10:35
|
You can't.Temporary tables are deleted when the session is closed. E 12°55'05.25"N 56°04'39.16" |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-08-28 : 14:16:29
|
I have very little knowledge about .NET. AFAIK you can store datasets/objects in cache/viewstate right?Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2007-08-28 : 14:18:46
|
svgeorge -- you would be much better off explaining what you are trying to do in some detail, so we can provide guidance on the best way to do it. I doubt that using temp tables is what you need.- Jeffhttp://weblogs.sqlteam.com/JeffS |
|
|
svgeorge
Starting Member
23 Posts |
Posted - 2007-08-28 : 14:37:28
|
Dear all, I am creating a user interface. have web pages for making several 9 type of payments.The data gets loaded on web page from SQL server 2005 database.Then I have Process payment button(ProcPaymBTM_Click) on the web page(Detail View)This is done. on clicking this button(ProcPaymBTM_Click) on (Detail View) all selected (checked) data columns needs displayed on another page (Review Data) In this page i click confirm payment button to insert selected data to the SQL Tables.I need help to get the selected data on Detail View to appear on the next page Review Data.Then insert these data to tables in SQL.Here is the button on click code... that has to open the new page with checked data fron earlier page.....Please let me know where the data set needs to be coded as u said earlier Please Help..protected void ProcPaymBTM_Click(object sender, EventArgs e){Dataviewlisting.ActiveViewIndex += 1;int IndexCount = 0;String ProcessingPayment;SessionValues ValueSelected = null;DataTable SelectedPayment = new DataTable();if (Session[Session_UserSPersonalData] == null){ValueSelected = new SessionValues();Session.Add(Session_UserSPersonalData, ValueSelected);}else{ValueSelected = (SessionValues)(Session[Session_UserSPersonalData]);}ProcessingPayment = ValueSelected.PaymentSelected;switch (ProcessingPayment){case "EnollNotPaidBTM":break;case "PlacNotPaidBTM":break;case "Ret1NotPaidBTM":break;case "Ret3NotPaidBTM":break;case "Ret6NotPaidBTM":break;case "Place2ndNotPaidBTM":break;case "EnrollBonusNotPaidBTM":break;case "WPRNotPaidBTM":break;case "SatisCompleteNotPaidBTM":break;default:break;}foreach (GridViewRow DataSelected in this.DetailDataList.Rows){if (((CheckBox)DataSelected.FindControl("ApprovalCk")).Checked){IndexCount += 1;}}This is the code i used to get the data displayed on First web page........this data generated from checked values here needs to be displayed on next page only when clicked on the button , So as you said can you assist me with the dataset ot new table to be created with the selected data only to be displayed.// Not_Paid_BTMprotected void Cick_Detail_Enrollment(object sender, EventArgs e){//EnrollNotPaidBTMWebLibraryClass ConnectionFinanceDB;ConnectionFinanceDB = new WebLibraryClass();Button ObjectClick = (Button)sender;string ConditionValue;SessionValues ValueSelected = null;ProcPaymBTM.Visible = true;if (Session[Session_UserSPersonalData] == null){ValueSelected = new SessionValues();Session.Add(Session_UserSPersonalData, ValueSelected);}else{ValueSelected = (SessionValues)(Session[Session_UserSPersonalData]);}ConditionValue = ValueSelected.CONDITION;ValueSelected.PaymentSelected = ObjectClick.ID.ToString();if (ObjectClick.ID.ToString() == "EnrollNotPaidBTM"){DbDataReader CollectingDataSelected = null;Dataviewlisting.ActiveViewIndex += 1;try{CollectingDataSelected = ConnectionFinanceDB.CollectedFinaceData("SELECT DISTINCT SSN,[FIRST NAME],[LAST NAME],Project_ID as [PROJECT ID],[PROJ START DT]AS ENROLLMENT,[PROJ END DT] AS TERMINATION,TERM AS [TERM CODE] FROM dbo.V_1st_Enrollment_Agency_Payment_List " + ConditionValue);}catch{}DataTable TableSet = new DataTable();TableSet.Load(CollectingDataSelected, LoadOption.OverwriteChanges);DetailDataList.DataSource = TableSet.DefaultView;DetailDataList.DataBind();}}Hope you will guide me .....Thanks ,Santosh George |
|
|
svgeorge
Starting Member
23 Posts |
Posted - 2007-08-28 : 15:03:19
|
so from the coding i am using c sharp i am using datagrids... an get data from the sql server as seen in code....this data whichever selected for example has to appeatr on the next page on clicking a button on earlier page |
|
|
svgeorge
Starting Member
23 Posts |
Posted - 2007-08-29 : 09:45:29
|
Hi peso and all I want to store the data for that session in temperory table and get those for the next page.So how this can be donePlease suggest |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-29 : 09:47:22
|
Why can't you use SESSION variable on ASP page? E 12°55'05.25"N 56°04'39.16" |
|
|
svgeorge
Starting Member
23 Posts |
Posted - 2007-08-29 : 11:15:03
|
Hi peso,How do i do this |
|
|
svgeorge
Starting Member
23 Posts |
Posted - 2007-08-29 : 11:43:10
|
Peso ,what i am trying to do is as mentioned below. Please can you help me with this how this can be doneHow do I Create Temp table to store data in Web User Interface.I have one main page FinancePayment.aspxthis has One main page Data View Listing....all onlu count of SSN numbers....on clicking on numbers i get all details as name last name etc.....for all the ssn of persons this is on Detail view page .......then i check the ssn i want and click the process payment button......so the checked data from Dataview Listing has to come to the next view that is Review data......Here i need help to get the data..how can i get the data when i have no connection with server ...and i only want to checked data on the Review data page where i finally approve and records gets inserted to databaseI am having datagrids to collect data for the first page and in C# coding I have given query and now I get these data on first page.Now First page has a button and check box for each record as template.I need help to get the selected data on Detail View to appear on the next page Review Data.This is code i have to get data for first page...// Not_Paid_BTMprotected void Cick_Detail_Enrollment(object sender, EventArgs e){//EnrollNotPaidBTMWebLibraryClass ConnectionFinanceDB;ConnectionFinanceDB = new WebLibraryClass();Button ObjectClick = (Button)sender;string ConditionValue;SessionValues ValueSelected = null;ProcPaymBTM.Visible = true;if (Session[Session_UserSPersonalData] == null){ValueSelected = new SessionValues();Session.Add(Session_UserSPersonalData, ValueSelected);}else{ValueSelected = (SessionValues)(Session[Session_UserSPersonalData]);}ConditionValue = ValueSelected.CONDITION;ValueSelected.PaymentSelected = ObjectClick.ID.ToString();if (ObjectClick.ID.ToString() == "EnrollNotPaidBTM"){DbDataReader CollectingDataSelected = null;Dataviewlisting.ActiveViewIndex += 1;try{CollectingDataSelected = ConnectionFinanceDB.CollectedFinaceData("SELECT DISTINCT SSN,[FIRST NAME],[LAST NAME],Project_ID as [PROJECT ID],[PROJ START DT]AS ENROLLMENT,[PROJ END DT] AS TERMINATION,TERM AS [TERM CODE] FROM dbo.V_1st_Enrollment_Agency_Payment_List " + ConditionValue);}catch{}DataTable TableSet = new DataTable();TableSet.Load(CollectingDataSelected, LoadOption.OverwriteChanges);DetailDataList.DataSource = TableSet.DefaultView;DetailDataList.DataBind();}} Please suggestThanksSantosh George |
|
|
|