|
Hi...
validate your session variable like below...u need to check for "null" not for "0"
if(Session["Authen"]==null)<br />
Response.Redirect("LogIn.aspx");
Regards,
Sandeep Kumar.V
|
|
|
|
|
OOps that very well observed
i think thats compiler error that could not be the problem
-- modified at 2:13 Tuesday 16th October, 2007
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
OK.I've already done all Session variable checking for authentication to all of every .aspx pages(I don't use <authentication> of Web.config).
The point is that it works fine until i clicked log out link and cleared all Session i used and redirect to LogIn.aspx and then i type the url directly "http://localhost/default.aspx" to browser .The result is I still can acces this page althrough i've logged it out.
Next i try to check why Page_Load of default.aspx don't check authentication
So i beaked this line in Page_load
... Page_Load(....)
{
if(Session["Authen"]=="0"||Session["Authen"]==null)
Response.Redirect("LogIn.aspx");
else
}
Then I test it, I log in then log out.Now the current page was redirect to LogIn.aspx.After that i type url of default.aspx to browser.I can access default.aspx as i still log in.It's not even enter the Page_Load function that i've breaked.Why? Is it about Session cache?
|
|
|
|
|
i have following thing in my web project
1. A web user control which contains a drop downlist.
2. A web-form that contains a drop-downlist and the web contol above mentioned.
3. Two tables - One is master and other is child.
I am populating the master table data in the dropdownlist which is lying in the web-user control.
Now my question is , How can i populate the dropdownlist , which is lying in the web-form from the dropdownlist , which is lying the web-user control , on the selected index changed function of the drop-downlist lying in the web-user control.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Can you Plz be more elaborative.
you need to do all these thing on server-side or on client-side.
|
|
|
|
|
Hello Everyone
I have a text file which has some data in Russian language.But when I store this russian text into DataBase through my code logic in C# Asp.net that is showing ??? ??? ?? ?. so anybody helps me how can this is store as russian text into DB?
Thanks in advance
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
what datatype you are using in DB.
Use Datatype as 'Nvarchar'
And while sending that data through any procedure, there also use datatype as Nvarchar.
Nvarchar datatype has length -- 4000.
Hope it will help you.
|
|
|
|
|
Use the Datatype as NVarChar for stroing it in the Databases.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Hi,
I have a datagrid and i Iterate through the columns in datagrid one by one , i need to store the column values in Datacolumn. How can i achieve it, Please help me with DataColumn syntax.
|
|
|
|
|
|
Thanks, article was very useful.
|
|
|
|
|
hi all,
how can we restrict the user to type text in file upload control if i am using javascript and trying to display the alert message but single character is remains but other control events are not working (ex:buttons).
pls help me .
Thanks And Regards,
Guru
|
|
|
|
|
try this hope this will work
|
|
|
|
|
thanks ,but pls confirm i think it does not allow the user to type the text.
|
|
|
|
|
Hi,
I am using the datagrid and in one datagrid column I have used another datagrid. So how can I find that datagrid and bind data to that.
can any one give me solution for this??????
Thanks to all
|
|
|
|
|
you can just search for how to crete relations in asp.net
|
|
|
|
|
In gridview you can do it following manner:
On Rowdatabound:
protected void ParentGridView_RowDataBound(object sender, GridViewRowEventArgs e)<br />
{<br />
if (e.Row.RowType == DataControlRowType.DataRow)<br />
{<br />
GridView ChildGridView = (GridView)e.Row.FindControl("NestedGridView");<br />
}<br />
}
Here "NestedGridView" is the gridview Control have created in aspx file.
And "ChildGridView" object which you have created to play in .cs file.
Hope This will help you.
|
|
|
|
|
In this article: "Encrypting and Decrypting Configuration Sections [^]" we discover how to use Aspnet_regiis.exe to Encrypting and Decrypting web.config sections.
My problem is that it works using a machine-specific key, so I cannot encrypt the web.config and then send to a remote server (like in shared hosts, when the website is hosted in a shared ISP).
I remember some time ago that I saw a good tool where I inform the password in a Windows Forms GUI, that returns the base64 encrypted password. So, I can use a simple function to decrypt from web.config im my Asp.net code.
I can't find that tool anymore. I don't remember neither the site or the name.. Can someone help me?
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.(John 3:16)
|
|
|
|
|
I need to display a Treeview control with nodes representing values that can be outdated. I want to display the outdated nodes in red, and the rest of the nodes in light green. I guess the object TreeNode must have a Style property or so, but I can't find it. Please, I would greatly appreciate any suggestions!
|
|
|
|
|
Hi All,
I am experiencing problems with a .net web page...
It seems that when i put in a dropdownlist with a high item count the page freezes up on post back.
I was just enquiring as whether anybody else has experienced this problem and if so could they offer a solution.
Thanks
|
|
|
|
|
joesolly wrote: high item count the page
How many items are there in your drop downlist ?
Even you have 100 or 200 it should not give any problem
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi,
There are over 16,000 items in the drop down list when i remove the control everything works fine but like i said when it is there the page just freezes up...
Regards
|
|
|
|
|
OOPS then its going to happen i don't have any suggestions for this only GOD and guru can help you
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
The item count in the drop down list is over 16,000... yes i know it is alot
|
|
|
|
|
Its waste by loading 16,000 items in the Dropdown list just laod all the contents in the DB abd activate it using the Ajax or atlas to the front end.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|