|
|
Hi, I am trying to ensure that the user is always returned to the login page should their session expire, or if they try to reach a page without logging in, using the code below.
<%
if Session("Logged_In")= "" Or Session("Logged_In") = 0 or Session("Userid")= "" then
Session("Userid") =""
Session("Title") =""
Session("Forename") = ""
Session("Surname") = ""
Session("UserType") = ""
Session("Logged_In") = ""
Session.Abandon
dim strHttp
strHttp = "http://" & Request.ServerVariables("HTTP_HOST") & "/ourDomain/"
%>
<%end if%>
For the first case, if there was no opening window, a runtime error occurs due to there being no window opener
For the second case we do get the login page, but the "unauthorised" page still loads - big problem. . I know this is possible, banking sites, etc, do this. Has anyone done this before who can help? Thanks a lot!!!
Polymorph
|
|
|
|
|
Hi,
I'm running an aspx webform which is using a VB class that I've created. I'd like to know how I can display a message in my aspx webform when for exemple I invoke the toString method of my class or any other returned value for my class.
Any help is welcome
|
|
|
|
|
hi,
add a label in aspx page as follows
<asp:label id="lblFileName" runat="server" cssclass="FieldName">Label
in aspx.vb file you can pass the sting value to the aspx lablel
like this
----------------------------------------
try
catch ex as exception
lblFileName.text=ex.message or ex.tostring
end try
---------------------------------------------
bye
yesuvadian@excelindia.com
|
|
|
|
|
Thanx for tips
but I'd like to see an alert Box so that the user can click on OK to continue.
Bye
|
|
|
|
|
hi,
I did not get your question.
do u mean alertbox or confirm box?
can u plese tell me Scenario where extacly u need this
regards
yesu
|
|
|
|
|
Hi,
Yes I mean alertbox like just after clicking on a delete button, display a message to the user like "Are you Nuts ???" with yes or no as answer
regards
sybux
|
|
|
|
|
Sybux,
can i have the code for the alert box,
Bcoz i am coming across the same problem
When user clicks delete button(server control) i shoudl alert him
can i have code sybux?
------------------------------------------
Regards,
Jude Asis Prabhu
Chennai,India.
Email:rjaprabhu@netscape.net
|
|
|
|
|
hi,
can u try this ?
I think this will work..
"btnCheckIn" name of the server side button.
code for adding javascript for server side button:-
btnCheckIn.Attributes.Add("onclick", "Checkin()")
This will call javascript "Checkin" function in the client machine
in javascript function we have writen confirm javascript code..
if "yes"
location.href="1.aspx"
we are passing the deleting "ids" as Querystring to that page with flag..
based on the flag condition we are deleting the record..
it is working fine ,if u feel it is good try out this
all the best,
regards
yesu
|
|
|
|
|
Hi,
I've made some nice report with Crystal Report and for the moment, I've hard-coded the printer name so that it can be printed to my printer.
Is there a way to get the list of all printer connected to the client ?
Or at least is there a way to send the report to the default printer of the client ?
|
|
|
|
|
if i created an object on the server using server.createobject (blah).
How can i use this same created object on different pages??
Pelase help. Thanks.
|
|
|
|
|
hi,
i think using session it is possible
set x =server.createobject(blah)
session("blah")=x
use this session in all the pages till it is alive.
i hope this will help u
|
|
|
|
|
What are they...? How many HTML embedded langs are there...?
ASP
PHP
These are i'm familar with and seem to be the most popular on hosting services...but there must be more no...?
Python
JSP
Are these HTML embedded langs...?
p.s-Can you use perl as the index page for yer website...?
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
how can i create a timer in asp that will call a function every second to change some text in a text box.
e.g.
Request.Form("txtText") = "1 Second"
Request.Form("txtText") = "2 Seconds"
Request.Form("txtText") = "3 Seconds"
Please help.
|
|
|
|
|
ASP is a server side scripting language...you can't refresh your webpage from the server (I think). You have two options as far as I see it...
1) Use JavaScript to periodically refresh yer page
2) There is a META tag attribute you can use to refresh your page also.
So says MSDN, i'm not sure if it's cross browser friendly
The following example causes the browser to reload the document every two seconds.
<META HTTP-EQUIV="REFRESH" CONTENT=2>
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hello,
How do I have a web page viewed by the user in a language other than English? What special care do I need to take? Is it possible that the user can see this page without downloading any fonts or something?
Thanks
Hitesh
|
|
|
|
|
I want to know how to fill nodes in TreeView Control by using ASP;)
KT
|
|
|
|
|
Hey Folks:
Im pretty new to application development in ASP andVBScript.
IM having trouble with sessions.
I have the global.asa and am trying to access a report number variable from that file for all the pages thats dependent on it.I have used Server.transfer to load the second form after the first is completed..But yet my trouble is when the second form is loaded it opens a new session.
Where is the mistake??Please suggest possible places where I might have made errors
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
I don't believe the problem is yours. I've run into this problem also when the browser is set to reject cookies. As an alternative you can always pass the numer as a querystring.
|
|
|
|
|
now thatssomething i wanted to find out..How do i pass on info from one form to another using query string..well letsassume my report number is 789 and its stored in the textbox txt_reportnumber..
So this means Response.write("txt_reportnumber")would give me the value out on screen.Now instead of it giving out on screen if i want it available in another form how do i pass it in query string..
i mean
Response.redirect "form2.asp?reportnumber=??"
I mean i have tried about 4/5 times.
"form2.asp?reportnumber=23" will work.But if instead of 23 i wanted to pass a variable value collected in the form thats submitting this response i dont know how to do it.
pLEASE HELP ME IN THIS.sEND ME SOME CODE OR SOMETHING AND I CAN FIGURE IT OUT THEN.
regards
PradS
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
How can I make simple countdown effect:
10, 9, 8, 7, ... 3, 2, 1, 0
The span beetwen digit appearance should be 1 second...
Thank you in advance
Goran
|
|
|
|
|
|
I created a button on my asp.net page that when clicked did the following
private void Button1_Click(object sender, System.EventArgs e)
{
// access the registry
Microsoft.Win32.RegistryKey s;
s=Microsoft.Win32.Registry.LocalMachine.OpenSubKey( @"Software\ODBC\ODBC.INI\ODBC Data Sources" );
// make sure we have a path there
if (s!=null)
{
string []xx = s.GetValueNames();
Label1.Text="";
// walk list
for (int i=0;i
|
|
|
|
|
I use a form to display combos and edit boxes. I read all the details using javascript. I do NOT wish to submit the form ever, although when the user presses ENTER the default action is to POST the form. How can I stop this please?
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
in the form tag, put onSubmit="return false;" , or just get rid of the form tag all together. If you are not submitting it, you dont need it.
|
|
|
|