|
i wants to if user is logout and then don't allow to go back with standard button i am using for logout but it don't control on back button of standard button
[code]
<%@ Language=VBScript %>
<% Option Explicit %>
<html>
<head>
<title>Voice Of Baraunians</title>
<!--#include file="front.inc"-->
</head>
<body ">
<%If Request.Cookies("empno") = "" Then%>
<div style="Position:Absolute; top:150; left:250;background-color: #f0f0f0">
<center><h2><font face="arial" color='blue'>You are not authorised to view this page. You will be prosecuted for this action</font></h2></center>
</div>
<%Else%>
<div style="Position:Absolute; top:150; left:100">
<h2>Logging Out ............</h2>
<h4>Wait a moment.</h4>
</div>
<%
Dim conn
Dim R
Dim vempno
Set conn = Server.CreateObject("ADODB.Connection")
conn.Mode = adModeReadWrite
conn.Open("DSN=Oracle; USER ID = gatepass; PASSWORD = gp")
Set R = Server.CreateObject("ADODB.Recordset")
R.Open "Select empno from emp_authority", conn, adOpenStatic, adLockOptimistic, adCmdText
vempno = Request.Cookies("empno")
R.Find "empno = " & vempno & ""
Response.Cookies("empno") = ""
R.Close
Set R = Nothing
conn.close
Set Conn = Nothing
Response.Redirect "message3.asp"
End If
%>
</body>
</html>
sanjeev
|
|
|
|
|
Using cookies to control who is logged in, is insane. Users can edit cookies. Use the Session to store this, and your pages will log out correctly, even if they hit the back button.
Wow - you're using classic ASP ? What a nightmare.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
ASP.NET 1:
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1)
Response.CacheControl = "no-cache";
Response.Expires = -500;
ASP.NET 2:
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddDays(-1)); //or a date much earlier than current time
Ref: http://www.codeproject.com/script/Forums/View.aspx?fid=12076&msg=2324415[^]
|
|
|
|
|
i am not using asp.net not any solution in asp with vbscript
sanjeev
|
|
|
|
|
I'm working on a clientside app that will use javascript on html pages that are stored in the users local my docs folder. This page is then displayed on the users active desktop. The active desktop refreshes at a set time which is great for my app but I need it to remember some setting each time it refreshes. Cookies is what I thought would be a great idea but I don't think I can use them without a webserver. Any ideas?
|
|
|
|
|
Looks like you can[^]
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have the following div element:
<div id="categoryleft" runat="server">LEFT</div>
<div id="categoryright" runat="server">RIGHT</div>
I looking to reference categoryleft at runtime because I want to populate it with categories. How do I do this?
Brendan
|
|
|
|
|
In the code behind ? You can't. You have to put a server control inside there, for example, a placeholder or a literal.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
If the DIV tag is set to run server-side, it can be referenced in the code-behind as an instance of a HtmlGenericControl class. I'm not sure how the OP intends to populate it though.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi,
i am making a website where i want to embed microsoft word program into it, does anyone have any suggestions how i can do this?
also, i want to make the microsoft word document event driven, for example, when the user clicks file, print, the website/program will recognise this and respsond by printing a line saying "thats correct". is there a way of doing this as i dont have the code of microsft word, so i need to do it myself. can someone please let me know if this is possible or do i have to make my own word processing program.
thanks
|
|
|
|
|
Hi,
I am using ASP.NET 2.0. I have a panel control on my page and I want to add a div to it at runtime. How do I do this. I also want to set the class property of the div at runtime accordingly.
Thanks
Brendan
|
|
|
|
|
Put a literal inside the panel, and then set it to be the div, with the class property, in your code behind.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Friends,
My cookies value gets reset between every two or three redirect between pages. The cookie value does not reset in mozilla or some version of IEs.
So the problem is not with the code. I have checked everything in IE options also . Wat might be the problem?
|
|
|
|
|
Can you show us your code? I think that it might be the cookie "path" problem..
|
|
|
|
|
Actually i have to design a form in which there is a row and an insert button. It should perform as such that on clicking of the insert button a second row should get created.How to do that in jsp
skd
|
|
|
|
|
|
hi,
I am trying to use AJAX for my two dropdown lists for my project using ASP.NET. On selecting an item in one dropdown(say dropdown1), the items for other dropdown(say dropdown2) should populate. Dropdown1 items are retrived from database using C#. My question is I need the selected item value of dropdown1. If I use dropdown1.SelectedItem.Value in C# side means error occurs. I need the selected item value.How can I get it using either javascript or C#.
Just now I am populating all the items in dropdown2. But I need the selected item value of dropdown1, so that I can able to filter and populate items in dropdown2 corresponding to dropdown1 item.
Can anyone help me. Please..........
Arun
|
|
|
|
|
|
Thanks. I have searched in Google first and also posted here. Its working fine.
I found that to get the value we can also use
document.getElementById('<%=ddlTraining.ClientID%>').value;
Its also returning the selected item value.
Thanks for ur help and I need it.
Thanks & Regards
Arun
|
|
|
|
|
hi all
i have some code check popup open but have some problem
in the fist link will open popup with pram is width="300" and height="300"
but when this popup is open when i click the link "open3" the window don't rezise width and height to "200" and "200"
Some body help me
if this popup is open and close this it and open new popup
OR if this popup is open, resize this popup with new pram
var newwindow;
function popUp(url, w, h, namn)
{
newwindow=window.open(url, namn, 'width='+ w +', height=' + h + ' resizable=no, scrollbars=auto, toolbars=no, location=no, directories=no, status=no, menubar=no, copyhistory=no');
if (window.focus) {newwindow.focus()}
}
open1
open2
open3
open4
|
|
|
|
|
Hi all, I am developing one application. In that i have created on report file which contains tables, titles and tree view list also by using HTML tags. I am opening this file in my application it self as another window.
There is no problem in opening this file if the file is small. If the file is big(here i mean to say, if number of tables present in this file are more)then while opening this file my application is displaying a message "Cannot create unique tag, giving up" (This message is given by HTML script i think) . I am unable to understand this message.
Can any one please tell me how to avoid this ???
|
|
|
|
|
Hi guys,
Need some help on this.
There are some image files available on a machine having windows OS installed. My web server is a unix based system. While creating webpage on unix based machine i need those image which are available on window OS based machine.
Is it possible to use those image files without uploading on our unix based machine.
If yes please let me know the process.
Vipin
|
|
|
|
|
Is your Windows OS is the Web server too? Can that windows machine be accessible from the Internet? If the answer for both questions is Yes then it is possible to use those image files without uploading on UNIX-base machine. If No, it's not possible. I think this might be the second time that you are asking this question. I hope my answer might be clear for you. If you still not clear then you reply to this thread instead of posting new post. Thank you.
|
|
|
|
|
Hi Michael,
My window OS machine is also Web Server can be accessible from the Internet.
Please let me know the process to access image files from window machine.
Thanks and Regards,
Vipin
|
|
|
|
|
You can just add the link as usual. Example : <img src="http://yourIISserver.com/myimage.jpg" />
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
|
|
|
|