 |
|
 |
Hi
please help me. I am new to .NET
I need code for Login control with Remember me option in VB.NET.
Thanks in Advance
VIKI
|
|
|
|
 |
|
 |
Article didn't explain anything. Just a "view the code"
|
|
|
|
 |
|
 |
Hi, Britney
I am facing problem regarding breadcrub, I m working on online-shope(ecommerce) site. I have one product page on which I m showing all products as per selected product category. So how I can change dynamically that "you are here "
like Home->Online shopping->Category->product name
KK Paliwal
Technical Consultatn
kk
|
|
|
|
 |
|
 |
In order to change dynamically the breadcrumb bar you must to use the ASP.NET sitemappath component and write dynamically the Web.sitemap.
Best regards
Brit
keep Learning and you never will be out of date...
|
|
|
|
 |
|
 |
Hola Britney, muy bueno el código, la verdad es muy útil. Pero además me impactaste vos, sos preciosa.
Andrés
|
|
|
|
 |
|
 |
Muchas gracias, espero te ayude para el desarrollo de tu trabajo.
keep Learning and you never will be out of date...
|
|
|
|
 |
|
|
 |
|
 |
It is always giving me an error with the name space :
The type or namespace LoginControl doesnt exist in the namespace ErikSchmidt
Can anyone help PLS !!!
|
|
|
|
 |
|
 |
I dont know, somebody chnge the code that i wrote...but i put the original article in this web address, http://www.fmmb.org/Implement_the_Login_control.rar[^]
Good luck
Brit
keep Learning and you never will be out of date...
|
|
|
|
 |
|
 |
I found your code very cool but it does't work well.Please help with more suitable and implementable code.
Thank you.
|
|
|
|
 |
|
|
 |
|
 |
Dear Britney,
Can you please provide me with an example, as how to implement Login Control in ASP.Net 2005 and also the User Name and Password should be validated from a SQL Database.Thanks in advance.
Regards,
Sudhi
|
|
|
|
 |
|
|
 |
|
 |
Thank you for good idea. If i have a questions i would like to consult to you.
|
|
|
|
 |
|
 |
Hi,
firstly thanks for article.
I was trying to use that code and i added password option like this:
string pass = cookie.Values["pass"].ToString();
if (pass != "")
{
Login1.Password = pass; //Write the password onto login password textbox
}
but then I found that compilation error:
Compiler Error Message: CS0200: Property or indexer 'System.Web.UI.WebControls.Login.Password' cannot be assigned to -- it is read only
I looked on password field proprieties on VWD and it is Read Only = false
Can somebody help me?
thanks a lot
Jordi from Catalunya (between spain, andorra and france)
|
|
|
|
 |
|
 |
//Write these following inline code..
<script runat="server" type="text/javascript>
protected void Page_init(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Request.Cookies["myCookie"] != null)
{
HttpCookie cookie = Request.Cookies.Get("myCookie");
LogOnControl.UserName = cookie.Values["username"];
TextBox txtPassword = LogOnControl.FindControl("Password") as TextBox;
txtPassword.Attributes.Add("value", Request.Cookies["myCookie"]["Password"]);
}
TextBox txtUser = LogOnControl.FindControl("UserName") as TextBox;
if (txtUser != null)
this.SetFocus(txtUser);
}
Response.Cache.SetNoStore();
}
///call this following event on <asp:Login ID="LogOnControl" runat="server" OnLoggedIn="LogOnControl_OnLoggedIn>
protected void LogOnControl_OnLoggedIn(object sender, EventArgs e)
{
HttpCookie myCookie = new HttpCookie("myCookie");
Boolean remember = LogOnControl.RememberMeSet;
if (remember)
{
Int32 persistDays = 15;
myCookie.Values.Add("username", LogOnControl.UserName);
myCookie.Values.Add("password", LogOnControl.Password);
myCookie.Expires = DateTime.Now.AddDays(persistDays);
}
else
{
myCookie.Values.Add("username", string.Empty);
myCookie.Values.Add("password", string.Empty);
myCookie.Expires = DateTime.Now.AddMinutes(5);
}
Response.Cookies.Add(myCookie);
}
</script>
//..................Hop this coding is useful
|
|
|
|
 |
|
 |
thanks, this is a very good article,
right now my webpage shows an encrypted url on every page -
http://mysite/(S(vnevenvelkvnln343433))/default.asp
this is a very good way to avoid enter without credentials, but I need to get back to http://mysite/default.asp because in my site I use a lot of hyperlinks to other pages, and next time the URL is going to be different and the hyperlinks is not going to work.
can you tell me how to take out this S(fhjfhwwhwhj3434hj3)) url-section ?
thanks in advance for your help,
|
|
|
|
 |
|
|
 |
|
 |
Hi,
Using ASPNET MemberShip do we want to write so much codebehind to implement the Remember me function.Is it configurable using web.config?.For me its not working ...
Ajith
|
|
|
|
 |
|
 |
Hi brit . There's a good new for u and myself. Here's an article that might be helpful for u somehow. Though it's still not perfect but it's really worth seeing.
Good luck and see ya
here's the link:
http://www.codeproject.com/useritems/Save_on_Close_of_Browser.asp
|
|
|
|
 |
|
 |
at first i wanna say that your article helps me a lot. But i need just 1 more task: when the user close the browser, all the session must be cleared or deleted. So when they access the page again, they must re-login.
And btw is there anyway to increase the session time-out duration? thx
|
|
|
|
 |
|
 |
teeBozss, im happy to hear that my article helps you.
So , i read your questions and here are my answers.
I dont know how to catch the close browser event, so i have the same problem.
Second in order to increment the session time-out you have to write these lines over web.config file
<*sessionState timeout="XX"/*>
Without *s
XX are the numbers of minutes to session timeout.
I hope you cant works with these lines, and if you solve the first problem, please contact me and tell how you solve it.
keep Learning and you never will be out of date...
|
|
|
|
 |
|
 |
uh sry but i have to read the html source to see the code solving the session time-out problem. I don't know why i can't see them but thx for the tip
About the browser close event, most of ppl told me that we must use javascript to do that. But i don't think so. There must be a better way and I'll try my best to find out and contact u asap See you soon.
|
|
|
|
 |
|
 |
Hi Britney,
While closing the browser we can handle the events. Let say for instance we can use Page_Unload event. But here is one more question on it. For example any interrupt occur while surfing web page all of sudden if your system fails. Then your primary memory you will lost. After reboot of your machine again you are requested to reloagin again into the website. Because server won't remember your session id and all once machine is shutdown or reboot. What i am saying is wantedly if you want to close the web page we can handle the page_unload event. But, like above interrputions we can not do any thing.( there is no question of page_unload). If you find any another solution for it please let me know i too need to implement this concept in my stuff.
Thank you,
Aswattha.
|
|
|
|
 |
|
 |
I have a asp.net project.i have followed authentication mode="Forms"
forms name="NavinsForm" loginUrl="logon.aspx" protection="All" path="/" timeout="30"/
it is working fine.
but..i want to validate only few pages in my site.
suppose a.aspx it needs authentication (only login user can see)...but there is another page b.aspx it doesn't required any authentication(any user can see).
so what should i do.
Sujit
|
|
|
|
 |