Click here to Skip to main content
15,891,473 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionis it possible that i upload mywebsite on apachi server Pin
UD(IA)6-Oct-08 4:30
UD(IA)6-Oct-08 4:30 
AnswerRe: is it possible that i upload mywebsite on apachi server Pin
eyeseetee6-Oct-08 4:33
eyeseetee6-Oct-08 4:33 
AnswerRe: is it possible that i upload mywebsite on apachi server Pin
Vasudevan Deepak Kumar6-Oct-08 8:35
Vasudevan Deepak Kumar6-Oct-08 8:35 
QuestionGood tutorial on moving items from one listbox to another Pin
eyeseetee6-Oct-08 4:24
eyeseetee6-Oct-08 4:24 
QuestionProblem with viewstate for listitems Pin
eyeseetee6-Oct-08 3:44
eyeseetee6-Oct-08 3:44 
AnswerRe: Problem with viewstate for listitems [modified] Pin
thomasa6-Oct-08 4:18
thomasa6-Oct-08 4:18 
GeneralRe: Problem with viewstate for listitems Pin
eyeseetee6-Oct-08 4:33
eyeseetee6-Oct-08 4:33 
GeneralRe: Problem with viewstate for listitems [modified] Pin
thomasa6-Oct-08 4:50
thomasa6-Oct-08 4:50 
Session is not updated at the time you go to the next page so you should us
ViewState or HttpContext.Current.Items["somevalues"]

If you have multiselect, you should splitt the valuse by somthing, so you can retrive them

Something lik:
if(listbox1.SelectedItem != null){
string strValues = "";
            for (int i = 0; i < listbox1.Items.Count;i++)
            {
if(listbox1.Items[i].Selected){
strValues += listbox1.Items[i].Value + ",";
}
strValues = strValues .Remove(strValues.Lenght - 1, 1); // To remove the last seperator
}

HttpContext.Current.Items["theItemsValues"] = strValues;
}


on the pageload of the new page:
if(HttpContext.Current.Items.Contains("theItemsValues")) {
							lbitems.Text= "Items selected: " +HttpContext.Current.Items["theItemsValues"].ToString();		
						}


If you then actually needs the items values:
string[] strListOfValues = HttpContext.Current.Items["theItemsValues"].ToString().Splitt(',');


modified on Tuesday, October 7, 2008 5:45 AM

GeneralRe: Problem with viewstate for listitems Pin
eyeseetee6-Oct-08 5:02
eyeseetee6-Oct-08 5:02 
GeneralRe: Problem with viewstate for listitems Pin
eyeseetee6-Oct-08 4:55
eyeseetee6-Oct-08 4:55 
GeneralRe: Problem with viewstate for listitems Pin
Sandeep Akhare6-Oct-08 19:01
Sandeep Akhare6-Oct-08 19:01 
AnswerRe: Problem with viewstate for listitems Pin
Sneha Bisht6-Oct-08 21:40
Sneha Bisht6-Oct-08 21:40 
GeneralRe: Problem with viewstate for listitems Pin
eyeseetee6-Oct-08 22:45
eyeseetee6-Oct-08 22:45 
GeneralRe: Problem with viewstate for listitems Pin
thomasa6-Oct-08 23:29
thomasa6-Oct-08 23:29 
Questionget user name from group which created by us in active directory Pin
Piyush Vardhan Singh6-Oct-08 3:41
Piyush Vardhan Singh6-Oct-08 3:41 
AnswerRe: get user name from group which created by us in active directory Pin
Abhijit Jana6-Oct-08 4:08
professionalAbhijit Jana6-Oct-08 4:08 
AnswerRe: get user name from group which created by us in active directory Pin
Brij6-Oct-08 4:31
mentorBrij6-Oct-08 4:31 
QuestionReporting Pin
Anoop Brijmohun6-Oct-08 3:35
Anoop Brijmohun6-Oct-08 3:35 
Questionhtml coding in stored procedure Pin
eyeseetee6-Oct-08 2:35
eyeseetee6-Oct-08 2:35 
AnswerRe: html coding in stored procedure Pin
Jaffer Mumtaz6-Oct-08 2:43
Jaffer Mumtaz6-Oct-08 2:43 
GeneralRe: html coding in stored procedure Pin
eyeseetee6-Oct-08 3:07
eyeseetee6-Oct-08 3:07 
GeneralRe: html coding in stored procedure Pin
Ashfield6-Oct-08 4:45
Ashfield6-Oct-08 4:45 
AnswerRe: html coding in stored procedure Pin
J4amieC6-Oct-08 5:15
J4amieC6-Oct-08 5:15 
Questionwindows service Pin
ptvce6-Oct-08 1:53
ptvce6-Oct-08 1:53 
Answer[Message Deleted] Pin
J4amieC6-Oct-08 2:09
J4amieC6-Oct-08 2:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.