Click here to Skip to main content
15,912,578 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: download Pin
enjoycrack8-Apr-07 0:21
enjoycrack8-Apr-07 0:21 
QuestionHow to create subdomain ? Pin
amin_behzadi7-Apr-07 23:46
professionalamin_behzadi7-Apr-07 23:46 
AnswerRe: How to create subdomain ? Pin
enjoycrack8-Apr-07 0:23
enjoycrack8-Apr-07 0:23 
Questionhow can rename a table in sql server 2000 (with tsql in query analyzer)? Pin
B.A7-Apr-07 20:54
B.A7-Apr-07 20:54 
AnswerRe: how can rename a table in sql server 2000 (with tsql in query analyzer)? Pin
Kunal P7-Apr-07 21:11
Kunal P7-Apr-07 21:11 
AnswerRe: how can rename a table in sql server 2000 (with tsql in query analyzer)? Pin
B.A7-Apr-07 22:38
B.A7-Apr-07 22:38 
QuestionTreeview problems with childnodes depth Pin
simsen7-Apr-07 20:43
simsen7-Apr-07 20:43 
QuestionSession Problem.. (Back Button) Pin
Kunal P7-Apr-07 19:41
Kunal P7-Apr-07 19:41 
hi
i wanted to implement sessions in my application... i wrote the following code on the login page

if (dread.Read())<br />
          {<br />
              Session["user"] = uname.Text;<br />
              Response.Redirect("MainP.aspx");<br />
          }


then on the page load event of the following pages i wrote this code..(used master pages.though)
<br />
if (!IsPostBack)<br />
        {<br />
            if (Session["user"] != null)<br />
            {<br />
                Label1.Text = Session["user"].ToString() + "!!";<br />
                //Label1.Text = Session["user"].ToString();<br />
                Response.Cache.SetExpires(DateTime.Now.AddSeconds(0));<br />
                Response.Cache.SetCacheability(HttpCacheability.NoCache);<br />
                Response.Cache.SetValidUntilExpires(true);<br />
<br />
            }<br />
            else<br />
            {<br />
                Response.Redirect("login.aspx");<br />
                string uname = (string)(Session["User"]);<br />
            }<br />
        }

Now the problem is that, if i dont login, no page will open, if i type the URL, but afted logout, on BACK BUTTON press of the web browser, the page opens, instead of getting redirected to login page.

any ideas..

then i created a LOGOUT LInk Button, and wrote the following code...

protected void LinkButton1_Click(object sender, EventArgs e)<br />
    {<br />
        Session.Abandon();<br />
        Session.Clear();<br />
        Session["user"] = null;<br />
        Response.Redirect("login.aspx");<br />
    }




Kunal

AnswerRe: Session Problem.. (Back Button) Pin
_mubashir8-Apr-07 2:59
_mubashir8-Apr-07 2:59 
GeneralRe: Session Problem.. (Back Button) Pin
Kunal P9-Apr-07 18:19
Kunal P9-Apr-07 18:19 
AnswerRe: Session Problem.. (Back Button) Pin
Venkatesh Mookkan8-Apr-07 18:50
Venkatesh Mookkan8-Apr-07 18:50 
Questiontcp/ip port listening Pin
Harikrk7-Apr-07 19:03
Harikrk7-Apr-07 19:03 
QuestionControl/Access Local Web Service(SOAP) from C# Desktop Application [modified] Pin
oolatin797-Apr-07 14:28
oolatin797-Apr-07 14:28 
QuestionHow to send variable from aspx.cs page to aspx page Pin
mani_iips7-Apr-07 5:10
mani_iips7-Apr-07 5:10 
AnswerRe: How to send variable from aspx.cs page to aspx page Pin
Hayder Marzouk7-Apr-07 6:42
Hayder Marzouk7-Apr-07 6:42 
QuestionHow can i bind DetailsView Pin
mghiassi7-Apr-07 4:19
mghiassi7-Apr-07 4:19 
AnswerRe: How can i bind DetailsView Pin
Naveed Kamboh7-Apr-07 8:06
Naveed Kamboh7-Apr-07 8:06 
GeneralRe: How can i bind DetailsView [modified] Pin
mghiassi7-Apr-07 18:43
mghiassi7-Apr-07 18:43 
GeneralRe: How can i bind DetailsView Pin
Abolfazl Sheikhloo7-Apr-07 22:30
Abolfazl Sheikhloo7-Apr-07 22:30 
QuestionHow can i use Application Object Pin
mghiassi7-Apr-07 4:16
mghiassi7-Apr-07 4:16 
AnswerRe: How can i use Application Object Pin
kubben7-Apr-07 4:45
kubben7-Apr-07 4:45 
GeneralRe: How can i use Application Object Pin
mghiassi7-Apr-07 6:01
mghiassi7-Apr-07 6:01 
GeneralRe: How can i use Application Object Pin
kubben7-Apr-07 7:20
kubben7-Apr-07 7:20 
GeneralRe: How can i use Application Object Pin
mghiassi7-Apr-07 18:36
mghiassi7-Apr-07 18:36 
GeneralRe: How can i use Application Object Pin
kubben8-Apr-07 2:13
kubben8-Apr-07 2:13 

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.