Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with postback on mobile forms

Status
Not open for further replies.

leearach2004

Technical User
Dec 8, 2005
86
GB
Hi there I have a collection of mobile form within on aspx file. I am having problems with the postback feature for a listbox.

I had a mobile form as my main page when i satrted designing and it worked fine but now i have added a new main form and had the origonal as a sub form it no longer works, heres the code
Code:
Protected Sub frmloc_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles frmloc.Load
        Dim locations As New tbllocAdapter
        Dim allStock As New tbl_StockTableAdapter
        If Not IsPostBack Then
            sltLoc.DataSource = locations.faetlocdata
            sltLoc.DataValueField = "Location"
            sltLoc.DataTextField = "Location"
            sltLoc.DataBind()
        Else
            oblstRec.DataSource = allStock.getstock(sltLoc.Selection.Value)
            oblstRec.DataBind()
        End If
    End Sub

this should check if the list is loaded for the first time, if it is populate it from the sql database else display the data object with the information relevent to that selected from the dropdown list. This worled when it was the first page to load but now the form is activated from a main page.
This for some reason now populates the list and tries to display the information at the same time it like it is checking for not ispostback and running the command but then checking for postback and running that to

anyone have any ideas I hope so cause im stumped
lee
 
Hi there I now know what the problem is dont know how to solve it though, the form load veernt for my forloc is running wqhen the page first loads and then again when the form loads, why is this happening
anyone have any ideas im so frustrated
lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top