I have a one single login page with two textbox of
Username(txtUse rname) and password (txtPassword) and two buttons with
one Login(cmdLogin) and Cancel(cmdCance l).
Now in the code behind I have code like
Private Sub cmdLogin_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles cmdLogin.Click
Dim CAPSsystem As CAPS.WebUserDB = New CAPS.WebUserDB( )
Dim webUserID As String = CAPSsystem.Logi n(txtUserName.T ext,
txtPassword.Tex t)
If Not (webUserID Is Nothing) And webUserID <> "" Then
Dim userDetails As CAPS.WebUserDet ails =
CAPSsystem.GetW ebUserDetails(w ebUserID)
Session("ssnUse rName") = txtUserName.Tex t
FormsAuthentica tion.RedirectFr omLoginPage(txt UserName.Text, 0)
Response.Clear( )
Response.Redire ct("CAPSFramese t.htm")
Else
lblMsg.Text = "Incorrect Username or Pasword"
End If
End Sub
which is checking credentials from Database.
Now instead of Response.Redire ct("CAPSFramese t.htm"), I want to open
CAPSFrameset.ht m 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','to p=0,left=0,scro llbar=0,toolbar =0');
} in HEAD
and cmdLogin.Attrib utes.Add("onCli ck", "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. 1 2061
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" <ch*******@yaho o.com> wrote in message
news:4e******** *************** ***@posting.goo gle.com... I have a one single login page with two textbox of Username(txtUse rname) and password (txtPassword) and two buttons with one Login(cmdLogin) and Cancel(cmdCance l).
Now in the code behind I have code like
Private Sub cmdLogin_Click( ByVal sender As System.Object, ByVal e As System.EventArg s) Handles cmdLogin.Click
Dim CAPSsystem As CAPS.WebUserDB = New CAPS.WebUserDB( ) Dim webUserID As String = CAPSsystem.Logi n(txtUserName.T ext, txtPassword.Tex t)
If Not (webUserID Is Nothing) And webUserID <> "" Then
Dim userDetails As CAPS.WebUserDet ails = CAPSsystem.GetW ebUserDetails(w ebUserID) Session("ssnUse rName") = txtUserName.Tex t FormsAuthentica tion.RedirectFr omLoginPage(txt UserName.Text, 0)
Response.Clear( )
Response.Redire ct("CAPSFramese t.htm")
Else lblMsg.Text = "Incorrect Username or Pasword" End If
End Sub
which is checking credentials from Database.
Now instead of Response.Redire ct("CAPSFramese t.htm"), I want to open CAPSFrameset.ht m 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','to p=0,left=0,scro llbar=0,toolbar =0'); } in HEAD
and cmdLogin.Attrib utes.Add("onCli ck", "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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: alanstew |
last post by:
With the body tag calling out 'window onload', a function with a
'window.open' fails at the 'window.open' line. If I cut out the body
tag, the function executes as normal.
At first I thought it was the entire function failing, but I tested
with alerts and found that it was only the 'window.open' that fails to
execute.
The function is being called by a link, and I suspected some problem
with the body alink/vlink but after cutting that out...
|
by: wayne |
last post by:
Hey there... I'm having some problems passing url parameters with an
open.window command. I'm not terribly familiar with java script but
here is the code below.
When executed it opens the window properly but does not pass the
parameter.
(this is part of a coldfusion template)
<a href="##"
|
by: dana lees |
last post by:
Hello,
I am using asp:HyperLink in a c# asp.net application to open a new window in
the following way:
<asp:HyperLink ID="lnkSiteName" runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.name") %>'
NavigateUrl='<%# "site.aspx?id=" + DataBinder.Eval
(Container.DataItem,"id").ToString()%>' Target="_blank">
</asp:HyperLink>
|
by: John Scott |
last post by:
Ok..this a rather odd question/problem. I haven't really found a straight
forward answer to how to handle this scenario, so I hope someone here can
help.
Here it is:
I have an application that allows users to log in. Each user can have
multiple roles within the application. Each role allows the user to access
different sections of the app and allows/denies them certain functionality.
|
by: Dave |
last post by:
For some reason, the below lines only work on select machines. All
machines are running IE6. IE SP's and OS's vary. When it doesn't
work, default.aspx (the page that this code is in) opens and closes.
That's all you see. TSReminder.aspx doesn't even open. I'm not sure
what's going on here.
Response.Write("<script...
| |
by: Socrates |
last post by:
Hi - Have tried for half and hour to get this script to work:
I am trying to close the parent window while opening a centred new
child window
I would be grateful if someone could correct the script below which
does open a new window, but not in a centred position.
Here is the link to the url:
|
by: Nicholas |
last post by:
Hello, i need to pass an argument to window.open but it seems it wont work.
What am i doing wrong?
This in in head:
<SCRIPT LANGUAGE="JavaScript">
<!--
function nw(a,b){
myWindow = window.open("", "Window", 'toolbar,width=a,height=b')
//-->
|
by: Gyanchand |
last post by:
Using window.open, I am opening an htm page in popup window. I am just allowing the window to have the toolbar.
Is there any setting by which I can allow only the "Print button" instead of the entire toolbar.
Code for opening new window :
OpenWin = window.open(page,"newwindow","toolbar=Yes,menubar=No,location=No,scrollbars=Yes,resizable=No,status=No,width=750,height=500,left=150,top=50,");
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |