I want a link button to perform two functions:
1. log off form authenticated user
2. navigate to another page
In the click event, I accomplished #1 with:
System.Web.Security.FormsAuthentication.SignOut().
What is code for the navigation?
Thanks. 5 2104
Hi Michael,
How about a Redirect?
Private Sub LinkButton3_Click _
(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles LinkButton3.Click
System.Web.Security.FormsAuthentication.SignOut()
Response.Redirect("http://msdn.microsoft.com")
End Sub
Ken
Microsoft MVP [ASP.NET]
Toronto
"MichaelCaditz" <Mi***********@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com... I want a link button to perform two functions:
1. log off form authenticated user
2. navigate to another page
In the click event, I accomplished #1 with: System.Web.Security.FormsAuthentication.SignOut().
What is code for the navigation?
Thanks.
The link button is in the contents frame of a frameset. The URL to which I
redirect opens in that frame. I want it to open in a full page, i.e. as a
hyperlink can have "_parent" as a target. Any ideas?
Thanks!
"Ken Cox [Microsoft MVP]" wrote: Hi Michael,
How about a Redirect?
Private Sub LinkButton3_Click _ (ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles LinkButton3.Click System.Web.Security.FormsAuthentication.SignOut() Response.Redirect("http://msdn.microsoft.com") End Sub
Ken Microsoft MVP [ASP.NET] Toronto
"MichaelCaditz" <Mi***********@discussions.microsoft.com> wrote in message news:B2**********************************@microsof t.com...I want a link button to perform two functions:
1. log off form authenticated user
2. navigate to another page
In the click event, I accomplished #1 with: System.Web.Security.FormsAuthentication.SignOut().
What is code for the navigation?
Thanks.
Hi Michael,
It's a bit of a hack, but I'd just jam in some Javascript to make it go to
the parent's frame:
Private Sub LinkButton3_Click _
(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles LinkButton3.Click
System.Web.Security.FormsAuthentication.SignOut()
Page.RegisterStartupScript("redir", _
"<script>window.open('http://msdn.microsoft.com','_parent');</script>")
End Sub
Does that do it?
Ken
Microsoft MVP [ASP.NET]
Toronto
"MichaelCaditz" <Mi***********@discussions.microsoft.com> wrote in message
news:C1**********************************@microsof t.com... The link button is in the contents frame of a frameset. The URL to which I redirect opens in that frame. I want it to open in a full page, i.e. as a hyperlink can have "_parent" as a target. Any ideas?
Thanks!
"Ken Cox [Microsoft MVP]" wrote:
Hi Michael,
How about a Redirect?
Private Sub LinkButton3_Click _ (ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles LinkButton3.Click System.Web.Security.FormsAuthentication.SignOut() Response.Redirect("http://msdn.microsoft.com") End Sub
Ken Microsoft MVP [ASP.NET] Toronto
"MichaelCaditz" <Mi***********@discussions.microsoft.com> wrote in message news:B2**********************************@microsof t.com... >I want a link button to perform two functions: > > 1. log off form authenticated user > > 2. navigate to another page > > In the click event, I accomplished #1 with: > System.Web.Security.FormsAuthentication.SignOut(). > > What is code for the navigation? > > Thanks.
That works! I appreciate your help.
I was surprised there wasn't a control which combines hyperlink with click
event in code behind page.
Michael
"Ken Cox [Microsoft MVP]" wrote: Hi Michael,
It's a bit of a hack, but I'd just jam in some Javascript to make it go to the parent's frame:
Private Sub LinkButton3_Click _ (ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles LinkButton3.Click System.Web.Security.FormsAuthentication.SignOut() Page.RegisterStartupScript("redir", _ "<script>window.open('http://msdn.microsoft.com','_parent');</script>") End Sub
Does that do it?
Ken Microsoft MVP [ASP.NET] Toronto
"MichaelCaditz" <Mi***********@discussions.microsoft.com> wrote in message news:C1**********************************@microsof t.com... The link button is in the contents frame of a frameset. The URL to which I redirect opens in that frame. I want it to open in a full page, i.e. as a hyperlink can have "_parent" as a target. Any ideas?
Thanks!
"Ken Cox [Microsoft MVP]" wrote:
Hi Michael,
How about a Redirect?
Private Sub LinkButton3_Click _ (ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles LinkButton3.Click System.Web.Security.FormsAuthentication.SignOut() Response.Redirect("http://msdn.microsoft.com") End Sub
Ken Microsoft MVP [ASP.NET] Toronto
"MichaelCaditz" <Mi***********@discussions.microsoft.com> wrote in message news:B2**********************************@microsof t.com... >I want a link button to perform two functions: > > 1. log off form authenticated user > > 2. navigate to another page > > In the click event, I accomplished #1 with: > System.Web.Security.FormsAuthentication.SignOut(). > > What is code for the navigation? > > Thanks.
Hi Michael,
Glad that works for you.
I'll have to check whether what you need is coming in ASP.NET 2.0.
Ken
Microsoft MVP [ASP.NET]
Toronto
"MichaelCaditz" <Mi***********@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com... That works! I appreciate your help.
I was surprised there wasn't a control which combines hyperlink with click event in code behind page.
Michael
"Ken Cox [Microsoft MVP]" wrote:
Hi Michael,
It's a bit of a hack, but I'd just jam in some Javascript to make it go to the parent's frame:
Private Sub LinkButton3_Click _ (ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles LinkButton3.Click System.Web.Security.FormsAuthentication.SignOut() Page.RegisterStartupScript("redir", _
"<script>window.open('http://msdn.microsoft.com','_parent');</script>") End Sub
Does that do it?
Ken Microsoft MVP [ASP.NET] Toronto
"MichaelCaditz" <Mi***********@discussions.microsoft.com> wrote in message news:C1**********************************@microsof t.com... > The link button is in the contents frame of a frameset. The URL to > which I > redirect opens in that frame. I want it to open in a full page, i.e. as > a > hyperlink can have "_parent" as a target. Any ideas? > > Thanks! > > "Ken Cox [Microsoft MVP]" wrote: > >> Hi Michael, >> >> How about a Redirect? >> >> Private Sub LinkButton3_Click _ >> (ByVal sender As System.Object, ByVal e As System.EventArgs) _ >> Handles LinkButton3.Click >> System.Web.Security.FormsAuthentication.SignOut() >> Response.Redirect("http://msdn.microsoft.com") >> End Sub >> >> Ken >> Microsoft MVP [ASP.NET] >> Toronto >> >> "MichaelCaditz" <Mi***********@discussions.microsoft.com> wrote in >> message >> news:B2**********************************@microsof t.com... >> >I want a link button to perform two functions: >> > >> > 1. log off form authenticated user >> > >> > 2. navigate to another page >> > >> > In the click event, I accomplished #1 with: >> > System.Web.Security.FormsAuthentication.SignOut(). >> > >> > What is code for the navigation? >> > >> > Thanks. >> >>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Pat |
last post by:
All,
What I want to do:
*******************
Click on a hyperlink in the last column in a datagrid, have it grab a
value in the fourth column in the same row and send it to the codehind
into a...
|
by: Joshua Weir |
last post by:
Hi,
I want to simply add hyperlink functionality to a normal web control button.
I understand that i can use the hyperlink button for this but in this case i
dont want to do this.
Say i have...
|
by: Waran |
last post by:
Hi,
In a datagrid I am displaying 2 columns. One is a Hyperlink Colum and the
other is a Button Column. The values for the hyperlink columns are fetched
from the database and its a url. When I...
|
by: wrytat |
last post by:
I have a form with a textbox for the user to enter a quantity and another
textbox for the delivery date. I disabled this delivery date textbox such
that the user has to press a calendar link next...
|
by: Joe |
last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first
column contains hyperlinks. When a user clicks one of these hyperlinks, he
will navigate to another aspx page (referred...
|
by: sulemanzia |
last post by:
I have a form with a Command button. i have a text box also which is
bound to my
Button. i have created a standard module and created an onclick event
for my button
which is something like this (...
|
by: =?Utf-8?B?Q2hhcnRz?= |
last post by:
I have been writing C# programs to spider yellow page to get list of
restaurant name, address to the database. When I encounter button or
hyperlink, I don’t know how to use the program to click...
|
by: vspsdca |
last post by:
Hi,
I'm a newbie here and does not really have any formal training on VBA. I just need help to get my hyperlink to work. I have a form in MS Access with a browse button where a user can select a...
|
by: sivasrec |
last post by:
Hi,
This is sivakumar from India. Now I am learning to ASP.NET 2.0..
I have a doubt....
I have used in a one hidden field control, 2 label controls, 2 button controls and...
|
by: sierra7 |
last post by:
I'm trying to create a form where a user enters a document reference number and then clicks a command button to add a hyperlink to the document, via a file picker.
Thanks to Adezii's excellent...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |