C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

password


Posted Date: 03 Dec 2008      Posted By: harika      Member Level: Bronze     Points: 1   Responses: 9



hi,
for password iam using property textmode='password', when iam selecting country dropdownbox, states will be dispalayed automatically, my problem is after selecting country, password is refreshing means whatever i had entered in textbox it shows empty.i want solution for this password will be visible after selecting country also.





Responses

Author: Reach2Shaik    03 Dec 2008Member Level: GoldRating: Revenue Score: 0     Points: 0

If u dont need autopostback for country ddl set it to false. Otherwise u need to use AJAX.

Don't forget to rate this answer, if it is helpful...
Regards Shaik



Author: Pradeep Iyer    03 Dec 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 5

Hi Harika,

This is because the whole page is doing post back when you select an entry in the dropdown box.

So you have to put the whole code in the dropdownlist change event into the following code:

If Not IsPostBack Then

EndIf

For example:

If Not IsPostBack Then
YOUR DROPDOWN CODE HERE
EndIf


Also set the AutoPostBack property of the dropdownlist to True.

Hope this helps..

Regards,
Pradeep Y

Regards,
Pradeep Iyer



Author: Asal-2009    03 Dec 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 0

hi,
u better use AJAX.

Regards
Rajan

G.Rajan
Happy New Year



Author: sudheera    03 Dec 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Hi,
I have the same problem,if autopostbask property of ddl set to false,how ddl refresh,From AJAX,how to use for password?
Thanks in advance



Author: Roopesh Babu Valluru    03 Dec 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 3

Hi..

Use ajax or try to store the value in any statemanagement object like session or view state or cookies..

u can assign the value back to the textbox which is stored in the cookie or session u used on postback...

All The Best..



Author: satheesh    03 Dec 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 4

HI,
change the autopostback property false for the dropdownlist
otherwise use the password field in the last of your page .. ie after entering all details u should fill the password field in your form ...
then click the button...
otherwise use ajax for this..



Author: Deepika Haridas    03 Dec 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 3

Hi,,
Use ajax so that your page doent refresh on click of each control

Check this too

http://www.singingeels.com/Articles/Membership_Using_ASPNET_AJAX.aspx

Regards,
Deepika



Thanks & Regards,
Deepika
Editor

If U want to shine like a SUN..First U have to burn like the SUN!!
Need a Guide? Join my mentor program..



Author: Preet    03 Dec 2008Member Level: GoldRating: Revenue Score: 0     Points: 0

There is one way by which you can solve this issue, what you need to do is :

you would need to put the values in the textbox again at the postback event.

add the following code:-

if(! Page.ispostback)

else
{
txtPassword.Attributes.Add("value", txtPassword.Text");
}

Hope it helps



Author: Yugi    03 Dec 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 5

Hi yar

all the above solutions may not solve your problem except Preet


use hidden control or cookies

in page lode

if (!ispostback)
{
fill the ddl with countries list (other wise they will add multiple time)
}
else
{
txtpassoward.Text= add u r cookie/ hidden control value
}


// password control doesn't maintain viewsate
//and using ajax is not only one the solutions


//autopostback false for ddl ==> your funtionality won't work

so the above solution may help you, try to get better solution also



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : C# .NET+open word application problem+The RPC server is unavailable. (Exception from HRESU
Previous : Problem with formula running totals in crystal reports
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use