|
how do i make a web page expire and send the user back to the login screen i'm useing csharp with asp.net
thanks
chad
|
|
|
|
|
in the web.config set the "timeout" attribute of the sessionstate element. eg.
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20" />
will expire the session after 20 minutes.
hope this helps.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Hi,
As well as the above solution, if you wanted the page to automatically navigate back to the logon screen (say if someone left the page open for too long), then insert the following meta tags in your HTML pages
<html>
...
<meta http-equiv="Refresh" CONTENT="600; URL=http://my.site/login.aspx">
...
<body>
...
This would navigate back to the login page after 10mins has elapsed.
Hope this helps,
Andy
|
|
|
|
|
Actually I need to do Drill Down Crystal Report.
For Ex 10 Master Records are there.TEST1,TEST2 like that
If I click TEST1,It should display TEST1 detail Record (It is in Another Report)Help met to do.
radha
|
|
|
|
|
Yes, u can link sub reports based on some criteria.
U should use some other discussion forum for product specific questions.
cool man
|
|
|
|
|
hi all i am using dreamweaver to create an asp site and i ve too questions
1- how can i validate a date enterd in a textbox
2- how can i make the password confirmation part whiel a user wants to change his/her password.
these might be a piece of cake but its making mw go crazy
|
|
|
|
|
Your first question:
3 options...
1) Use a JS date picker control so it's entered one way always and only...still have to check that on the server side though eh...
2) Manually parse (splitting on a period or slash) and run some basic checks.
3) Use regex or existing library/framework...like http://www.dithered.com/javascript/form_validation/usage.html[^]
As for your second question...i'm not clear what exactly you want...???
Prompt the user using javascript like
var ret = prompt("Are you sure you want to change your password");
if(ret){
location.href = "pwd_chg.php?newpwd="+oForm.pwd;
else
alert("Password change aborted!!!");
}
How do I print my voice mail?
|
|
|
|
|
A quick'n'dirty solution to validate a date on the server side:
/* needed to parse DateTime-Values (for Germany) */
protected IFormatProvider culture = new CultureInfo("de-DE", true);
protected string[] expectedFormat = {"D", "d"};
/***********************************/
private bool ValidateDateString(string dateString) {
try {
DateTime validationDate = DateTime.ParseExact(dateString,
expectedFormat, culture, DateTimeStyles.AllowWhiteSpaces);
}
catch {
return(false);
}
return(true);
}
|
|
|
|
|
Dear all,
I would like to display real time data ( from sensors ) on the web.
The refresh rate I would like to achieve is 1 Hz. I have got solution using the meta refresh HTML, but it is not convenient for refresh rate smaller than 1 minute.
Any idea/advise ? any direction to look at ? Web service or web form ?
Thanks for help,
loic
|
|
|
|
|
What kind of language are you going to use? A web service sounds like a good idea, but you will not get away with only that. The refresh rate might need some Java script involved as well.
Niklas Henricson
|
|
|
|
|
The script perferms the following. There are three levels. Company -> Project -> Task
The objective is to be able to click on Company/Project to expand/hide the child nodes. Currently I have been able to get this functionality; however, a problem as arisen. When you click on task it should have no effect, but instead the expand/hide function is triggered for the parent node.
Please view my same code here:
http://www.airvisionadventures.com/XML/task.html[^]
A list of all files (XML, XSL, JS, CSS) are listed here:
http://www.airvisionadventures.com/XML/[^]
Please let me know if you have any suggestions.
|
|
|
|
|
I should have know. The problem was bubbling. I have heard about it but have never come accross a situation where I needed to control it. Anyways, for anyone who is interested a good article is located here:
http://wdvl.com/Authoring/JavaScript/Events/bubbling.html[^]
So, basicly I needed to add an extra onclick action to the last DIV node (onclick="event.cancelBubble = true"). This prevents the browser from bubbling up to the parent div tag and running the onclick action associated with it. I hope this helps someone!
|
|
|
|
|
I develop my web application in using Ms Visual Studio.NET 2003, OS - Windows XP, Web Server - IIS 5.1.
My web application (using ASP.NET, VB) is connect to Access database.
Now, I have deploy it and try to run it in the Windows 2000 Platform, with IIS 5.0.
Why my web application failed to perform on the necessary task like, edit, update, and delete?
Is that mean my web application got some bugs or something?
Please advice.
|
|
|
|
|
Uhm... Developing a web application in one enviroment and migrating it in another isn't really recommended, but that is just my opinion (I had personally problems once when I developed ASP.NET under Win 2000 and migrating it to Windows XP after). To me it sounds like if IIS or .NET Framework would be the issue. Have you tried to build your application in Win 2000 instead?
Niklas Henricson
Sweden
|
|
|
|
|
I haven't.
As I'm building my web application in WinXP, IIS 5.1, so I have tried on Windows 2000 Professional.
What is your suggestion?
Regards,
Aaron
|
|
|
|
|
In my case I had problems with my .NET framework so I had it reinstalled.
What error message do you get in Windows 2000 when you try to run your application?
Niklas Henricson
|
|
|
|
|
Hie,
Finally, my problem is solved.
Thank you very much, Niklas.
Regards,
Aaron
|
|
|
|
|
Niklas Henricson wrote:
To me it sounds like if IIS or .NET Framework would be the issue. Have you tried to build your application in Win 2000 instead?
Building the Solution under Win 2000 would not help as the code will still compile to the same MSIL, only when the code is JIT-compiled will the differences between platforms occur.
I would think the problem is more to do with security permissions than anything else.
Niklas Henricson wrote:
problems once when I developed ASP.NET under Win 2000 and migrating it to Windows XP after
Windows XP has a much tighter security model that Windows 2000, and now with SP2 it is tighter still. I've had problems migrating from W2K to XP but they were all security related. Recompiling the code on the new platform made no difference.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
In top of my control thr is a + sign and Title.
what i want to do is when the user click on ('+') a drop down
menu should appear and (+ sign) should change to (- sign).
when the user click on (- sign) the drop down menu will go to top
and hide.
please provide a jave script for this.
|
|
|
|
|
Something like this ?
<a href="javascript::;" onclick="var
el=document.getElementById('hideEl'),
pm=document.getElementById('titleEl');
if (el.style.display=='none')
{ el.style.display=''; pm.innerHTML='-'; }
else
{ el.style.display='none'; pm.innerHTML='+'; }">
<div><span id="titleEl" />+</a> Menu title </div>
<div id="hideEl" style="display:none;">
<ul>
<li>Menu 1</li>
<li>Menu 2</li>
</ul>
</div>
|
|
|
|
|
when i try to view my web page with ie explorer i get this message
Server cannot access application directory 'c:\inetpub\wwwroot\WebApplication2\'. The directory does not exist or is not accessible because of security settings.
and i type in the address bar this url
http:\\mycomputer\webapplication2
how do i fix this problem
thanks
chad
|
|
|
|
|
cmarmr wrote:
Server cannot access application directory 'c:\inetpub\wwwroot\WebApplication2\'.
That is because IIS thinks you want to view the directory, any you haven't given permission for that. You need to tell IIS the name of the page that it should be displayed by default when a user doesn't enter one in the URL.
To do this, open up the Internet Information Services (IIS) panel in the Administrative Tools folder. Navigate to the appropriate virtual directory, right-click it and select "Properties". In the new dialog, select the Documents tab, make sure that "Enable Default Document" is checked. Add the name of the web page you want displayed when the URL is just a directory name.
Does this help?
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
ok i tryied that is it did not work it like something on the page is trying to access something useing c:\inetpub\wwwroot\webapplication2\something instead of http:\\webapplication2\something
how can i fix this
chad
|
|
|
|
|
Sorry, I misread your original post.
Is there a part of a stack trace with the error message? Do you get the same error when you run your application from within Visual Studio? (i.e. you press F5 to open it in IE with a debugger attached)
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Does anyone know where I can find a xslt file to transform xml into html or how to open a new browser window from asp.net to display the xml. I have a string that contains the xml that is generated from an object. I want to display the xml to the user in the browser. The format can change so writing a custom xsl is time consuming. I just want to display the xml as would be done if you open up an xml file in the web browser. However, must of the xsl files that exist on a windows pc for doing this are specifically designed to be run by the browser and don't use the standard schema that is required by XslTransform. I want the data to be displayed in a nicely color and formated XML format. If anyone has any help for me on this it would be greatly appreciated.
|
|
|
|