|
The best you can do is work out in your pages that it has timed out, and redirect to the login page.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Before getting the data from the Session first check is not null.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
praveenkumar_mca wrote: so i want to validate when session is expired.
As Christian told you need to validate session existence on each page_load. It could be something like
if ( session["yoursessionvalue"] == null)
Response.Redirect("Loginpage");
|
|
|
|
|
Check the session value in page load. If it is null then redirect the login page showing the message that your session is time out.
|
|
|
|
|
Why is it that suddenly so many questions get the same answer given over and over again ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Respected Gurus
I have to export a datagrid to excel in asp.net1.1
my code is:---
Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click
Response.ContentType = "application/vnd.ms-excel"
' Remove the charset from the Content-Type header.
Response.Charset = ""
' Turn off the view state.
Me.EnableViewState = False
'Dim tw As New System.IO.StringWriter
tw = New System.IO.StringWriter
'Dim hw As New System.Web.UI.HtmlTextWriter(tw)
hw = New System.Web.UI.HtmlTextWriter(tw)
' Get the HTML for the control.
DataGrid1.RenderControl(hw)
' Write the HTML back to the browser.
Response.Write(tw.ToString())
' End the response.
Response.End()
End Sub
whenever i run this code i got the error message that control datagrid1_....
must be placed inside a form tag with runat=server.
how to resolve it as all the controls are inside the form tag and runat=server attribute is also there.
Plz suggest.
|
|
|
|
|
check it
"http://www.codeproject.com/aspnet/DAtaGridExportToExcel.asp"
|
|
|
|
|
Hi,
As per the requirement of my application I need to download file from ftp server and copy the data to the database automatically.
I am using ASP.NET and I have downloaded file. How can I copy data to database.
Database is SQL Server 2005.
Please let me know asap..
Thanks a lot!!
SHWETA!!
|
|
|
|
|
shweta@syscom wrote: am using ASP.NET and I have downloaded file. How can I copy data to database.
I presume that you have downloaded file to server or any other location where ASP.NET account is having read/write permissions. Read the file and convert it to binary data. Store it in BLOB field of your table.
|
|
|
|
|
Yes I have downloaded the file from FTP Server.
Shall try this method now.
And is there any class in asp.net that can provide the facility to copy data from a csv file to database??
And how to automatically do all these tasks i.e downloadin and copyin at any particular time of the day and daily??
Thanks a lot!!
SHWETA!!
|
|
|
|
|
shweta@syscom wrote: And is there any class in asp.net that can provide the facility to copy data from a csv file to database??
No, there is no predefined class which does this., You can create your own class
shweta@syscom wrote: And how to automatically do all these tasks i.e downloadin and copyin at any particular time of the day and daily??
A scheduler ? You can create a webservice that downloads file to server and copies to database. Write a windows application that gives scheduled request to webservice method.
|
|
|
|
|
Hi
My application is like this...
I have a LinkButton, OnClientClick() of LinkButton opens a seperate window containing two Radio Buttons.Now on selecting any of the RadioButton the window should automatically close.
I tried
RadioButton1.Attributes.Add("OnCheckedChanged","JavaScript:window.close()");
But it is not working.
How can I make this possible.
Suggest me an example.
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
chand10 wrote: RadioButton1.Attributes.Add("OnCheckedChanged","JavaScript:window.close()")
Try
RadioButton1.Attributes.Add("OnClick","JavaScript:window.close();")
are you using firefox ? I think window.close() is having problems with FF.
|
|
|
|
|
Gr8!!!!! Its working.
Thnx
But the click event is for Button know?!
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
chand10 wrote: But the click event is for Button know?!
No it's there for almost all controls.
|
|
|
|
|
I am running a Silverlight 1.1 application developed in July, just before loading the page error 'WPF/E installed on your system is no longer valid' is thrown.
Then I uninstalled SilverLight 1.1 Alpha and installed Silverlight.1.1.AlphaRefresh, but then also it is not working. Silverlight.1.1.AlphaRefresh is released for IE 6 and 7 on Windows SP2 and Windows Vista. But OS in my system is Windows 2003 Server. Can anyone help me in fixing the issue.
Thanks,
Satindra
|
|
|
|
|
Hi
If server is receiving 2 requests of user name , password and site name , they are from 2 different clients on different machines., how to open users accounts individually.
For Example : site it contains 2 user accounts , i pass the request from the 2 different machines to server.using code it will open account and maintain individually.
Plz tell this urgent requirement for me
if any one know about this concept give me reply
Advance thx
|
|
|
|
|
vurugonda wrote: i pass the request from the 2 different machines to server.using code it will open account and maintain individually.
Still your question is not clear. Are you asking about, what will happen if two users requested at same time ?
|
|
|
|
|
Hi
Thx for ur reply
for examlple i logged as in
1.site1 with username and password
2.site2 with username and password
though the code
pass above 2 request to server
i want to maintain two different account.
if i login with one site1 of 2 user account then also maintain two different account individually.
i think so u got my point.
thx
|
|
|
|
|
vurugonda wrote: site1 with username and password
2.site2 with username and password
though the code
pass above 2 request to server
Sorry still not clear with your question. Assume i looged into Site1 with user name and password, and I also logged into Site2 with other user name and password. What do you mean by pass 2 request to server? Which server you will pass? How you will get these details since both are in two different sites ?
vurugonda wrote: i want to maintain two different account.
Make me clear that, are you maintaining two accounts in one site or different site's ?
|
|
|
|
|
Hi
i want to maintain different accounts to login into one site then get details of each account.
how many user accounts logged in and retrive the details of that particular user.
thx
|
|
|
|
|
vurugonda wrote: how many user accounts logged in and retrive the details of that particular user.
For the admin rite ? Who wants to see the results of how many users logged in ? You have some events in Global.asax. In application_start event you start one application variable that holds each session count. In session_start event increment this count. Printing application variable value will give you total number of active sessions.
To retrieve details of that account, you need to store userid also in application variable. I presume that you have a unique userid to identify each user.
|
|
|
|
|
Hi
How to combine two Applications(solutions) into one application
"is there any possibility to work with two different kind of applications in a single application".
this is very urgent
if any one know plz reply me.
if know any examles forword to me
advance thanks
|
|
|
|
|
Hi Guru's
I'm having problem on writing cookie, not on the code but I can't seem to find the actual cookie file that was created, I also tried to placed the cookie path to my project folder but I still can't seem to find the cookie that was created. Below is my code for creating cookie.
Am I doing something wrong?
Please advice
<br />
Dim bcap As HttpBrowserCapabilities<br />
Dim bookmarkCookie As HttpCookie<br />
bcap = Request.Browser<br />
<br />
<br />
If Not bcap.Cookies = True Then<br />
wc_header.setError("Cannot bookmark page, Cookie is not enabled in this browser")<br />
Return False<br />
<br />
Else<br />
bookmarkCookie = New HttpCookie("pageBookmark")<br />
bookmarkCookie.Path = Server.MapPath("../")<br />
bookmarkCookie("pageID" & pID) = CType(pID, String)<br />
bookmarkCookie.Expires = Now.AddDays(1)<br />
Request.Cookies.Add(bookmarkCookie)<br />
<br />
Return True<br />
<br />
End If<br />
<br />
|
|
|
|
|
Cookies are saved in special folders on users computes and you cannot change this (well, you can if you change the registry settings on every machine for the cookies folder). The usual folder in which cookies are saved is [WINdrive]:\Documents and Settings\[user name]\Cookies
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|