Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a user home address.Once he fill the address details,Next time the same address will be retriew from that previous address.

I am using the checkbox for retriew the same address by using auto postback property is true.But it is not working.What can i do?

What I have tried:

C#
protected void chkSameAddress_CheckedChanged(object sender, EventArgs e)
        {
            
                if (chkSameAddress.Checked)
                {
                    txtGuardianStreet.Text = txtstreet.Text;
                    txtGuardianCity.Text = txtCity.Text;
                    txtGuardianZip.Text = txtZip.Text;
                    txtGuardianCountry.Text = txtCountry.Text;
                }           
            
        }
Posted
Updated 5-Jun-17 1:21am
v2
Comments
Afzaal Ahmad Zeeshan 5-Jun-17 3:01am    
Why is it not working? Does it return anything? Try debugging and see why is the condition not being met.
Maathavan Balasubramanian 5-Jun-17 3:06am    
I don't know the reason for why it is not working
Thanks7872 5-Jun-17 3:14am    
What do you mean by not working?
Maathavan Balasubramanian 5-Jun-17 3:19am    
same address is not retriew.
Kornfeld Eliyahu Peter 5-Jun-17 3:20am    
It seem like you missed the AJAX thing...

You have to learn using (utilizing) the ideas of AJAX... As you are already in the ASP.NET world it may be the best to use Microsoft's AJAX framework...
Microsoft Ajax Overview[^]
Microsoft Ajax[^]
The complete ASP.NET Ajax Tutorial[^]
 
Share this answer
 
hi, try adding the checkbox in update panel. don't forget to put the script manage in your aspx file.
ajax panel
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900