Rothariger Posted July 24, 2005 Posted July 24, 2005 hello, i must to make that, i have found this code that acomplish that, but, when i make the postback i loose all that i have done... how can i make so the changes are still there after the postback??? im making this little example for make a try... but at the postback i loose all data... Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Introducir aquí el código de usuario para inicializar la página If Not IsPostBack Then ListBox1.Items.Add(New System.Web.UI.WebControls.ListItem("Uno", 10)) ListBox1.Items.Add(New System.Web.UI.WebControls.ListItem("Dos", 20)) ListBox1.Items.Add(New System.Web.UI.WebControls.ListItem("Tres", 30)) ListBox2.Items.Add(New System.Web.UI.WebControls.ListItem("Cien", 100)) ListBox2.Items.Add(New System.Web.UI.WebControls.ListItem("Doscientos", 200)) ListBox2.Items.Add(New System.Web.UI.WebControls.ListItem("Trescientos", 300)) End If Button1.Attributes.Add("onclick", "javascript:return pasaraderecha();") Button2.Attributes.Add("onclick", "javascript:return pasaraizquierda();") thanks and salutes!!! Quote
Shurikn Posted July 25, 2005 Posted July 25, 2005 I dont remember wich option exactly needs to be set , but I know there's a property that makes the listboxes keep their data... look into the property box of your listboxes... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.