|
-
Dec 17th, 2004, 11:04 AM
#1
Thread Starter
Lively Member
How to programmatically refresh a page in asp.net?
hi, guys,
i have a simple problem to ask
let say i have a webform name: a.aspx
and i have a button name: btnA
when the user click btnA, i would like to refresh the a.aspx, how can i do that?
assumption: btnA is a control within the a.aspx and i dont want auto refresh in metadata setting.
thx.
-
Dec 17th, 2004, 03:22 PM
#2
Addicted Member
Re: How to programmatically refresh a page in asp.net?
Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Attributes.Add("onclick", "<script language=javascript1.2>window.location.reload(true);</script>")
End Sub
-
Dec 19th, 2004, 09:07 AM
#3
Thread Starter
Lively Member
-
Dec 19th, 2004, 11:54 AM
#4
Banned
Re: How to programmatically refresh a page in asp.net?
 Originally Posted by kkc
thanx for you replied, rdove.
i folllow your code, but i cannnot refresh.
however, all my code are written in codebehind.
can you give me a more detail coding about the example you give me?

Why dont you redirect back to the same page ??????
Response.Redirect("yourPage")
Jon
-
Dec 20th, 2004, 02:23 AM
#5
Thread Starter
Lively Member
Re: How to programmatically refresh a page in asp.net?
because i want to refresh a.aspx to remove all the session variable in a.aspx before i redirect back to a previous page.
i.e
i use "b.aspx" response.redirect to a.apsx
and i use the session variable from b.aspx pass to a.aspx,
the session variable passed to a.aspx was used as a logic flow control so that other user cannot directly a.aspx url to enter the a.aspx page
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|