Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to open a new window with no toolbar after login

Reply
Thread Tools

how to open a new window with no toolbar after login

 
 
chirakg21
Guest
Posts: n/a
 
      11-08-2003
I have a one single login page with two textbox of
Username(txtUsername) and password (txtPassword) and two buttons with
one Login(cmdLogin) and Cancel(cmdCancel).

Now in the code behind I have code like

Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdLogin.Click


Dim CAPSsystem As CAPS.WebUserDB = New CAPS.WebUserDB()
Dim webUserID As String = CAPSsystem.Login(txtUserName.Text,
txtPassword.Text)


If Not (webUserID Is Nothing) And webUserID <> "" Then

Dim userDetails As CAPS.WebUserDetails =
CAPSsystem.GetWebUserDetails(webUserID)
Session("ssnUserName") = txtUserName.Text
FormsAuthentication.RedirectFromLoginPage(txtUserN ame.Text, 0)


Response.Clear()

Response.Redirect("CAPSFrameset.htm")

Else
lblMsg.Text = "Incorrect Username or Pasword"
End If

End Sub

which is checking credentials from Database.

Now instead of Response.Redirect("CAPSFrameset.htm"), I want to open
CAPSFrameset.htm in new window which I need to be without Toolbar and
hide the orignal Login window.

I tried using Javascript code
function CallScript(){
window.open ('CAPSFrameset.htm','test','top=0,left=0,scrollbar =0,toolbar=0');
} in HEAD

and cmdLogin.Attributes.Add("onClick", "CallScript()") in page-load of
the form

but it isn't working for me i think because I already have serverside
code for that button.
 
Reply With Quote
 
 
 
 
Chris Jackson
Guest
Posts: n/a
 
      11-10-2003
You are exactly right - if you have server side code, the runtime will
inject a javascript function in what it renders, and your javascript code
will not be called. Change that button to an <input type=button>, without
runat=server, and it should work as you expect.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Shell/UI
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"chirakg21" <> wrote in message
news: om...
> I have a one single login page with two textbox of
> Username(txtUsername) and password (txtPassword) and two buttons with
> one Login(cmdLogin) and Cancel(cmdCancel).
>
> Now in the code behind I have code like
>
> Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles cmdLogin.Click
>
>
> Dim CAPSsystem As CAPS.WebUserDB = New CAPS.WebUserDB()
> Dim webUserID As String = CAPSsystem.Login(txtUserName.Text,
> txtPassword.Text)
>
>
> If Not (webUserID Is Nothing) And webUserID <> "" Then
>
> Dim userDetails As CAPS.WebUserDetails =
> CAPSsystem.GetWebUserDetails(webUserID)
> Session("ssnUserName") = txtUserName.Text
> FormsAuthentication.RedirectFromLoginPage(txtUserN ame.Text, 0)
>
>
> Response.Clear()
>
> Response.Redirect("CAPSFrameset.htm")
>
> Else
> lblMsg.Text = "Incorrect Username or Pasword"
> End If
>
> End Sub
>
> which is checking credentials from Database.
>
> Now instead of Response.Redirect("CAPSFrameset.htm"), I want to open
> CAPSFrameset.htm in new window which I need to be without Toolbar and
> hide the orignal Login window.
>
> I tried using Javascript code
> function CallScript(){
> window.open

('CAPSFrameset.htm','test','top=0,left=0,scrollbar =0,toolbar=0');
> } in HEAD
>
> and cmdLogin.Attributes.Add("onClick", "CallScript()") in page-load of
> the form
>
> but it isn't working for me i think because I already have serverside
> code for that button.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
window.open with toolbar=1 and without google toolbar ? pcouas Javascript 0 02-19-2007 08:28 AM
how to open a web form in new IE window on clicking hyperlink with NO scrollbars, status bar and toolbar? loga123 ASP .Net 9 06-08-2006 01:06 AM
variables from new window after window.open() yawnmoth Javascript 1 08-29-2004 09:28 AM
window.open() doesn't open new Window in Opera PC HUA Javascript 2 05-19-2004 02:29 AM
Need to open a new browser window, not a new window Gordon ASP General 3 04-16-2004 10:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57