Click here to Skip to main content
15,892,746 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Avoiding Button Double Click - AJAX Pin
Karan_TN6-Jun-10 19:59
Karan_TN6-Jun-10 19:59 
QuestionDevelop Video Chat/Voice Chat Pin
Member 47201843-Jun-10 21:25
Member 47201843-Jun-10 21:25 
AnswerRe: Develop Video Chat/Voice Chat Pin
Sandeep Mewara3-Jun-10 22:59
mveSandeep Mewara3-Jun-10 22:59 
AnswerRe: Develop Video Chat/Voice Chat Pin
walterhevedeich4-Jun-10 0:05
professionalwalterhevedeich4-Jun-10 0:05 
QuestionIntegrate Google calender with ASP.Net Pin
Amit Patel19853-Jun-10 20:59
Amit Patel19853-Jun-10 20:59 
AnswerRe: Integrate Google calender with ASP.Net Pin
saini arun3-Jun-10 21:13
saini arun3-Jun-10 21:13 
AnswerRe: Integrate Google calender with ASP.Net Pin
Sandeep Mewara3-Jun-10 23:04
mveSandeep Mewara3-Jun-10 23:04 
QuestionLogout on click Pin
Dot-Net-Dev3-Jun-10 18:18
Dot-Net-Dev3-Jun-10 18:18 
Following is my code for login:

void Page_Load(object sender, EventArgs e) {

string appURL = "http://www.mysite.com/Login.aspx";
string strPostData = String.Format("login={0}&password={1}",
"myloginname", "mypassword");

// Setup the http request.
HttpWebRequest wrWebRequest = WebRequest.Create(appURL) as
HttpWebRequest;
wrWebRequest.Method = "POST";
wrWebRequest.ContentLength = strPostData.Length;
wrWebRequest.ContentType = "application/x-www-form-urlencoded";
wrWebRequest.CookieContainer = new CookieContainer();

// Post to the login form.
StreamWriter swRequestWriter = new
StreamWriter(wrWebRequest.GetRequestStream());
swRequestWriter.Write(strPostData);
swRequestWriter.Close();

// Get the response.
HttpWebResponse hwrWebResponse =
(HttpWebResponse)wrWebRequest.GetResponse();

// Have some cookies.
CookieCollection ccCookies = hwrWebResponse.Cookies;

// Read the response
StreamReader srResponseReader = new
StreamReader(hwrWebResponse.GetResponseStream());
string strResponseData = srResponseReader.ReadToEnd();
srResponseReader.Close();

// Display the response.
Response.Write(strResponseData);
}



It logs me in successfully but when I click on any link, it logs out.

Please let me know what's going wrong.
AnswerRe: Logout on click Pin
Viral Upadhyay3-Jun-10 18:50
Viral Upadhyay3-Jun-10 18:50 
QuestionPlease provide detailed description about delegates Pin
anoop_m833-Jun-10 12:12
anoop_m833-Jun-10 12:12 
AnswerRe: Please provide detailed description about delegates Pin
dan!sh 3-Jun-10 16:29
professional dan!sh 3-Jun-10 16:29 
AnswerRe: Please provide detailed description about delegates Pin
Viral Upadhyay3-Jun-10 19:05
Viral Upadhyay3-Jun-10 19:05 
GeneralRe: Please provide detailed description about delegates Pin
sharad Pyakurel9-Jun-10 1:36
sharad Pyakurel9-Jun-10 1:36 
QuestionHow to disable the page refresh due to activeTabChange of TabContainer inside UpdatePanel? Pin
mittalpa3-Jun-10 11:37
mittalpa3-Jun-10 11:37 
QuestionPassing parameter from one user control to another user control in an aspx page. Pin
mittalpa3-Jun-10 11:33
mittalpa3-Jun-10 11:33 
AnswerRe: Passing parameter from one user control to another user control in an aspx page. Pin
dan!sh 3-Jun-10 16:34
professional dan!sh 3-Jun-10 16:34 
QuestionHttpModules - scope Pin
Member 39190493-Jun-10 9:42
Member 39190493-Jun-10 9:42 
QuestionHow to implement event chaining with Page.Render Pin
Member 39190493-Jun-10 9:33
Member 39190493-Jun-10 9:33 
AnswerRe: How to implement event chaining with Page.Render Pin
T M Gray3-Jun-10 9:59
T M Gray3-Jun-10 9:59 
GeneralRe: How to implement event chaining with Page.Render Pin
Member 39190493-Jun-10 11:18
Member 39190493-Jun-10 11:18 
QuestionHow to develop forum application in .net Pin
naresh kumar a3-Jun-10 9:31
naresh kumar a3-Jun-10 9:31 
AnswerRe: How to develop forum application in .net Pin
T M Gray3-Jun-10 9:55
T M Gray3-Jun-10 9:55 
GeneralRe: How to develop forum application in .net Pin
naresh kumar a5-Jun-10 22:00
naresh kumar a5-Jun-10 22:00 
Questionwebservice json Pin
AndyInUK3-Jun-10 7:18
AndyInUK3-Jun-10 7:18 
AnswerRe: webservice json Pin
PSK_4-Jun-10 2:41
PSK_4-Jun-10 2:41 

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.