|
You have to check in each page load whether the session is null or not null.
If the session value is null means redirect to login page else to the required page.
VanithaVasu
|
|
|
|
|
Hi,
The real problem here is that the When he logout then the page is redirects to the Login page but,If he clicks the browser's back buttion then He can view the content of the page.
Your Idea --putting some code to page load event will not work here because it comes form the Browser's Cache memory. So it will display. Ok
Naresh Patel
|
|
|
|
|
You can disable caching on the client:
Response.CacheControl = "no-cache";
Response.AddHeader("pragma", "no-cache");
Response.Expires = -1;
Then the click on Back will cause a request to the server.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
can you please brief me on this concept.??
Bharath.S Ron
|
|
|
|
|
Please refer to the MSDN for information about this methods.
The effect is that the Browser does not hold a copy of the page in its cache and therefore requests the page from the server when the user clicks on the back button. And you can react as you wish on the server side - show login screen or whatever you like.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Yes you are right, But this method will fail with firefox browser. Any other alternative do you know for firefox ?
|
|
|
|
|
It's new to me that this approach fails with Firefox
I'll have to check this because this is no good news for my applications!
Thanks for the hint.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
I want the date format to be in this way like 15-jun-2005 using c# dot net
Regards,
Magi
|
|
|
|
|
DateformatFrom = datevalue.ToString("dd-MMM-yy hh:mm:ss");
you can convert the date into the format which ever you want.
I have shown you the one of the way to do that
Regards
Bharath.S Ron
|
|
|
|
|
get it Date format
---------------------------------------------------
|
|
|
|
|
Please do not cross post!
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Can i write Multiple Select Statements in DataAdapter .
If it is Possible means How to write ?
I have written like this but it is throwing the error.
DataAdapter=new OleDbDataAdapter("select * from Table1;select * from Table2",connection);
VanithaVasu
|
|
|
|
|
No u canot write like this.. u can use join querry
Sarith...
|
|
|
|
|
VanithaVasu wrote: Can i write Multiple Select Statements in DataAdapter .
Yes you can. When you fill dataset, it will contain two datatables. But instead of separating multiple queries with ; symbol, it's better to go for store procedure's.
VanithaVasu wrote: I have written like this but it is throwing the error.
DataAdapter=new OleDbDataAdapter("select * from Table1;select * from Table2",connection);
What's the error it's throwing ?
|
|
|
|
|
The Error is : Characters found after end of SQL statement.
I want to the two tables separately in my dataset.
How to do so?
VanithaVasu
|
|
|
|
|
What is it that you are after?
If you want more than two select statements in the table use a join.
If you want different select statements for different tables or adapters,
use different querystrings...
I think for ur case u need :
DataTable dt1=new DataTable();
DataTable dt2=new DataTable();
dt1="first sql select query result";
dt2="second sql select query result";
dataset ds=new dataset();
ds.Tables.Add(dt1);
ds.Tables.Add(dt2);
Hope that helps!!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
Insetd of trying this:
DataAdapter=new OleDbDataAdapter("select * from Table1;select * from Table2",connection);
Try this:
SqlDataAdapter adpt1 = new SqlDataAdapter("Select * From Table1", con);
DataSet ds = new DataSet();
adpt1.Fill(ds);
SqlDataAdapter adpt2 = new SqlDataAdapter("Select * From Table2", con);
adpt2.Fill(ds);
return ds;
Naresh Patel
|
|
|
|
|
VanithaVasu wrote: I want to the two tables separately in my dataset.
How to do so?
As I told before, stored procedure's would be better approach for your problem. Write a stored procedure like
CREATE PROCEDURE [dbo].[MultipleSelect]
AS
SELECT * FROM FisrtTable
SELECT * FROM SecondTable
GO
Now Set command type to stored procedures for your OleDbCommand. Pass this stored procedures and fill dataset. This will give you two tables in dataset. Returning multiple recordset is a recommended practice by MSDN, which boosts performance.
|
|
|
|
|
Hi all,
I am publishing my web site by right clicking the solution - publish -
In the out put bin folder there exists around 600 files around 200 Dll's and 400 .compiled files. I dont know where these came from. Am i doing the publish right or not? By the way my application is working ok. Another question also is that if i need to change some thing do i need to upload all the bin folder again?
Thanks
|
|
|
|
|
Hello all,
I need an application which can read a given pdf (with multiple pages)and break it into multiple files on a given parameter.
The first objective is to develop and application which can read the whole pdf word by word into a stream, and writing the same stream into another pdf.
If someone has done any work on that, then please share the same or any apropos information.
|
|
|
|
|
hi all,
I want to update the body of my web page say every 10 seconds without having to reload the page i.e. no flickers. I just want any part of the page that has changed e.g. a table connected to a database to show the current data without the users clicking anything i.e. it should be automatic, using a particular time interval like I mentioned.
i tried using the setInterval('function1()',10000) and the page gets reloaded.but i want to avoid this.How can i implement the same using AJAX?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
If you want to do it using AJAX then grab the framework from ajax.asp.net. Then you just have to drop an updatepanel around what you want to update and a timer to trigger it.
|
|
|
|
|
hi mark,
thanks for your reply. I thought using ajax will stop refreshing the page.Can i implement the same without using ajax? if it is possible,
can you please help me with some samples?
Thanks again
Regards
Anuradha
|
|
|
|
|
With ASP.NET Ajax extension, there are two important controls called "Update Panel" and "Timer".
1. Add the UpdatePanel control to your page.
2. Add Timer control (this control from Ajax extension. not windows timer.)
3. In Tick event of timer, do the updating your page.
I saw like that one in ASP.NET Forum.
Check-out this.
http://forums.asp.net/p/1118294/1740340.aspx
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
anu81 wrote: Can i implement the same without using ajax? if it is possible,
You can put the items that needs to be refreshed in seperate frame (IFrame) and reload the frame using javascript.
|
|
|
|