C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Training   ASP.NET Web Hosting    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

Play Silverlight Games or Submit your Silverlight applications and earn 90% AdSense revenue.

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






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.


Author: Pradeep Iyer    03 Dec 2008Member Level: DiamondRating:     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: Billa-2009    03 Dec 2008Member Level: DiamondRating:     Points: 0

hi,
u better use AJAX.

Regards
Rajan

G.Rajan
Happy New Year



Author: sudheera    03 Dec 2008Member Level: SilverRating:     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:     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:     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:     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 Haridas
DNS MVM

Please Rate this Response if you found it useful

Blog - www.angeldeeps.blogspot.com
Community - www.dotnetspider.com/sites/303/-TECHIE-QUESTIONNAIRE.aspx



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:     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