Click here to Skip to main content
16,018,949 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
I am developing a website in vs2015. In a form I have several dropdownlist that selecting a value on them change other values in the form.
the problem is that this works well when the user is logged in, but when it is not, by making autopostback the control values are lost.
Any idea why this happens?
Thank you

What I have tried:

the code that I use is only in the load and runs once because I have put conditional
C#
if (!IsPostBack)
            {
}

and dropdownlist controls are filled by ObjectDataSource
Posted
Updated 6-Aug-16 0:36am

1 solution

You can Use Ajax


@using (Ajax.BeginForm("Method Name", "Controller Name",
new AjaxOptions { UpdateTargetId = "ur Div Id" }))
 
Share this answer
 
v2

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