|
if You are using forms authentication use this
if (Page.User.Identity.IsAuthenticated)
{
}
or if You are using session check the session
If this is not your answer Sorry..!
Then be More clear..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
thnks for ur reply bro...............but i think u r not getting my question..........i hav created menu in html using UL tag,LI tag, and ANCHOR tag with scripting...............in this condition how to check .......
|
|
|
|
|
I have 2 questions for this.
1)Why would you go for html tags rather than using Navigation control in asp.net.
2)How You are checking for particular user whether he is logged in or not..!
KhandelwalA wrote: i hav created menu in html using UL
Then You are redirecting to particular page .Check the login condition.
But IMO Its not good.
But If you are using forms authentication . forms authentication will take care of it..!
Thts the advantage of forms authentication.
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
If your security system works at all, then a pure link is fine because your page itself will check if the user is logged in. On the other hand, a good design would not show options that the user is not allowed to access. Giving people the URLs to your pages that they can't access, is a good first step to their trying to break in.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
<script type="text/javascript">
function Test() {
var hidPWD = document.getElementById('<%=hidPassword.ClientID%>');
var txtPWD = document.getElementById('<%=txtPWD.ClientID%>');
hidPWD.value = txtPWD.value;
alert(hidPWD.value);
var hidConfirmPWD = document.getElementById('<%=hidConfirmPWD.ClientID%>');
var txtConfirmPWD = document.getElementById('<%=txtConfirmPWD.ClientID%>');
hidConfirmPWD.value = txtConfirmPWD.value;
alert(hidConfirmPWD.value);
}
</script>
I am try to store my password and confirmpass in some hidden field to maintain text(password) after pageload but its not working.
|
|
|
|
|
bhavnvyas wrote: I am try to store my password and confirmpass in some hidden field to maintain text(password) after pageload but its not working.
Well, your basic idea is kind of bizarre. Why would you need this ? Your control will keep it's value after pageload, unless you change it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
no my password in textbox is erased after pageload
|
|
|
|
|
Hi all,
I am using ASP in that i want to know how to hide the query string part in the address bar.
For example,
I have defined a hyperlink as
<a href="http://mywebsite.com/sumpage.asp?action=xyz"></a>
so, in browser i want to show only
http://mywebsite.com/sumpage.asp and hide the rest of the part.
How can i do it ??
Thanks in advance..
|
|
|
|
|
You can't. You can perhaps encrypt it, but there is no way to hide it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Your basic problem is finding an encryption algorithm that doesn't contain forbidden characters. What are you actually trying to achieve ? If something should be kept secret, you should not send it to the client at all. Wanting to encrypt your query string makes me feel that your design is broken to start with.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
|
How can I use OnRowCreated="grdFeeHead_RowCreated"
OnRowEditing="grdFeeHead_RowEditing" OnRowCancelingEdit="grdFeeHead_RowCancelingEdit"
OnRowUpdating="grdFeeHead_RowUpdating" event in c# ASP.NET
|
|
|
|
|
What have you tried ? Do you own any books ? Did you read any articles ? What do you expect these things to do ? Is this a totally random question, or do you have something specific you want to achieve ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i want to implement membership in my project.
i read about it...and find we can create roles using web site administration tool.
but my requirement is that the client wants to change the roles of users on daily bases.
how this can we achieved using roles in asp.net 2.0
One person's data is another person's program.
--J.Walia
|
|
|
|
|
The best way IMO is to write your own system, not use the built in rubbish.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Dont make it difficult for this guy Chris, it looks like he is new, so using the included membership system is the best option in this case
Alexei Rodriguez
|
|
|
|
|
You have to do it programmatically..!
for eg:to find the roles of the user
Response.Write (User.Identity.Name + " is a member of " + Roles.GetRolesForUser().Length + " Roles.<BR>");
Response.Write("User Roles" + "<BR>");
foreach (string role in Roles.GetRolesForUser())
{
Response.Write(role.ToString() + "<BR>");
}
Response.Write("All Roles" + "<BR>");
foreach (string role in Roles.GetAllRoles())
{
Response.Write(role.ToString() + "<BR>");
}
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
How does that allow him to change roles ? Can he add roles and remove them programatically too ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yes my friend..!
add role
Roles.AddUserToRole(userName, "rolename");
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Take a look at the Roles class[^]
You can create, delete and read roles, as well as adding and removing users to and from roles
For instance, you can show a gridview with all users and a checkboxlist with all the available roles that can be assigned to the selected user
Alexei Rodriguez
|
|
|
|
|
i m confused now...
what to do?? should i use membership or not??
One person's data is another person's program.
--J.Walia
|
|
|
|
|
I would certainly start by using the Membership class, as it hides a lot of the database interaction from you and provides a reasonable basic user management system that works with SQL Sever, mySQL, etc. It includes everything you need to get your head around, including encrypted passwords, user approval, roles, and applications so you can concentrate on your logic, rather than re-inventing the wheel. When you need to extend, then look at deriving from Membership first.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi, thanks for looking, i have a page that is some sort of sitemap, it only lists the links to all my products
I dont want google to show this sitemap as a result, but i want all the pages listed on this page to appear when they are relevant
Will this line make it??
<meta name="Robots" content="NoIndex, Follow" />
Thanks
Alexei Rodriguez
|
|
|
|