.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Session when Cookieless ="True" Page Ispostback is always false

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :ASP.Net

When Session attribute Cookieless ="True" the page.Ispostback is always false.Cant understand the reason behind it.

And one more thing what is happening when we click Remember Me option in login control.As per my knowledge it is storing authentication cookie in it. If we can add data to authentication cookie then why we need session...we can add session data in that.. and authentication token is also regenerated for every new request like sessions.....i got confused after browsing for few hours.

Which one is more secure using cookies or URL for authentication and session.


View Complete Post

More Related Resource Links

How to Consume (Cookieless =true) Session Enabled Web services

  Hi, I need to use cookieless=true in web.config and enablesession=true in web methods.   I've two web methods like, [WebMethod(EnableSession=true)] public void SetName(string Name) { Session["Name"] =Name; } [WebMethod(EnableSession=true)} public string GetName() { return (string)Session["Name"] }   In my aspx.cs, using proxy I want to call SetName in button 1 click, and retrieve the name (which i put it into web service session on button 1 click ) in button 2 click like,   protected void Button1_Click(sender o, eventargs e) { webserviceproxy proxy =new webserviceproxy(); proxy.SetName("Prabhu"); } protected void Button2_Click(sender o, eventargs e) { webserviceproxy proxy =new webserviceproxy(); Response.Write( proxy.GetName()); } Here, How can I use cookie container and how can i achieve what Im expecting to do?   Please help me on this. thanks Prabhu P Work Smart, Not Hard

send data in class object from one page to another using session


hello everybody

now i hav stored all data like user name, data fatched from database of that user

and i stored that data and user name such as:

string strUserName="user name"

dataset ds =new dataset();// data of that user

now i wan yo send d whole data from my login page to user profile page

can anybody help me for that...................

and plz tell me that how much is this way is benifitial to send data from one page to another page

plz........kindly waiting for positive rply

Changing aspx page causes session data to be lost...


Strange but true. Any ideas what might be causing this?


How to use cookieless session state...

I want to know how its work and it advantage and disadvantegePls explain me with example

Page Header, PrintOnFirstPage=False, HTML render fine, PDF export leaves extra space

As it says in the header.Setup:SSRS 2008, VS 2008 SP1Local Mode, rdlc fileDesign:Make a 1/2" Page header with a text box in it. Set PrintOnFirstPage=FalseBody contains a Table that spans multiple "hard" pages.Results:Renders to HTML in the report viewer just fine.PDF export leaves blank 1/2" at the top of page 1. With no header for page 1, I had hoped it would remove the extra space the same as in the report viewer.Question:Any way to tell SSRS not to leave space when page header is turned off for the first page?Attempts:Tried putting everything in a rectange in the header and set the visibility to false. Still leaves space.

radiobutton list item make visible true or false in javascript

in my project i have used one radiobuttonlist according different user login , i want to make one of radiobuttonlist item visible true or false..   please help me to solve this issue.   thanks in advance.  


Hey everyone, The method in my if statement is being called on postbacks even though the criteria clearly says not to. I'm stumped as to where to begin. Ideas are appreciated and I'd be happy to provide any information that may be needed. protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack && FormId != -1) { UpdateFormVisit(); } } The UpdateFormVisit() method grabs a number out of a database, increments it by 1, and updates the row with the new number. When a DropDownList triggers a postback from its OnSelectedIndexChanged event, the number is still incrementing.

Javascript: detect Page.IsValid and IsPostBack

In a client-side function that initializes a 3rd-party control, I want to detect whether the page is being loaded for the first time or as the result of a post back.  If it is a post back, I want to know if on posting the original page was valid. I tried using Page_ClientValidate() within the function, but that validates the page, and fires the RequiredFieldValidator, which isn't what I want to do at all! many thanks,    

how to redirect user to login page if session is null

i have 2 page,1.login.aspx ---  2.welcome.aspxin my login.aspx im storing username into sesssion as below:Session["usernm"] = txtUsername.Text;in my welcome.aspx  pagein page_load event if (Session["usernm"]==null)        {            Response.Redirect("Login.aspx");        }----- here if i manulally paste the url ( http://localhost:4125/Loginado/welcome.aspx) it should go to  login.aspx for user credentialsbut its going directly to welcome.aspx  page.

What is difference between Panel's Visible-True/False and Setting Multiview's ActiveViewIndex ?

Hi, I have a panel that contains several controls. On the other hand i have a MultiView that contains Several view that in turn itself contains several controls . In multiview we have to set ActiveViewIndex for the view which we want to see. That same thing can be done through Panel containing another seleral panel's and setting its Visible property to True/False accordingly. Is seems Multiview  is just using this Visible property internally to render controls .Since other views (whose Index is not set to be active Index) are processed on the server for its Whole life cycle(I am confused here..whether i am right or not) .Same thing perhaps happen when we use a Panel insteed and use Visible=True/False. So, what is the difference between MultiView and Panel taking this scenario ?

Is it possible to store objectdatasource in session or viewstate to use on another page?

Im building my objectdatasource on different button events.. so id like to know if i can store that or the results in a session or viewstate so i can use it on a pop-up window. explanation: User arrives at our page. They select or enter specific information to search.. results found are presented in a gridview, that is currently bound to the objectdatasource. Within that gridview i will be adding a button to open a new window that will display a googlemap with the location marked on the map. Also will be adding a button to view all the results on the map. So if your search returns 10 records and you want to see all 10 marked on the map, they can click the "View All" button and they are all marked on the map.. Or if you want to just view 1 at a time, you select that record and it display just that record on the map.   So not sure what i should do to accomplish this.

How to catch error in session variable in globals.asax(Application_Error) and redirect to same page

Hi, i have a login page where username got to enter his/her username or password. When you try to enter any scripting over there eg:'<asd>' it gives an error  'Server Error in '/' Application' 'A Potentially dangerous Request. Form value was detected from client' I don't want to redirect user to custom error page when such unpredictable error occurs. infact i got a label on the same page itself where error's are displayed. how can i display such errors on this very same label. can i do that using globals Application_Error ?. Session variable not working here. Please give me the exact steps for how i can catch and display the error which are not validated. waiting for reply thanks and regards, Learning Programmer

When Session is Expired then login page is show how do it

When Session is Expired then login page is show how do it

Session time out alert box and redirect login page


Dear all,

Now I am using Form authentication for my website. 

It is something like that below. But if I left the website without using it for quite some time and when I used it back, it is redirected to the login page. 

The one I want to know is that it is because of session expire or cookies expire. And if it is session expired, I want to show the alert box and redirect to the login page. And one more thing is that if the user keeps on using the website, I want to extend the session expire time. If you do not mind, I want to have some references for this scenario. Thank you so much.


If myUser.IsValidUser(txtUserName.Text.Trim, txtPassword.Text.Trim) = True Then

how to set Session out open login page


i create a web site using frame and child when session i s out i require Login page open in browser not opend in frmae

how to set Session out open login page

Return true or false from Popup window to Parent window


Hello everybody.

I am trying to return true or false from popup window to the parent window.

Actually the parent window has a button control, which on click popup another window. The popup window holds some emailing data and a button "send". This "send" button onclick send email. Now I want to return true if the email is successfully sent otherwise false, to the parent window. Depending on returning value a label present on parent window displays a text message.

But I am not able to implement it. Because it might happen that the popup window is blocked by web-browsers popup blocker or popup window is accidentally closed by user. So how can I confirm to parent window whether or not the email is successfully sent?

Please help me.

Thank you.

Ajax AutoComplete is not working when Cookieless is true


Hi All,

I have a web page that using AutoComplete Asp.net Ajax Control.

It was working find when the Cookieless is not "True".

I have no idea my it is not working when I set cookieless to "true".



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend