c# - using jQuery's .load() function to load multiple forms onto a page, and saving the filled in forms -



c# - using jQuery's .load() function to load multiple forms onto a page, and saving the filled in forms -

i have page can input multiple "orders" on 1 "invoice". have 3 types of orders , each type can on invoice multiple times. right write separate aspx page each type of order. this:

order1.aspx, order2.aspx, order3.aspx similar this:

<form id="order1" runat="server" class="order1"> <asp:label id="lblorder1" runat="server" for="txtorder1"><b>from:</b></asp:label> <asp:textbox runat="server" type="text" id="txtorder1" name="txtorder1" class="order1"/> </form>

on main page, can click 1 of 3 buttons add together order type, jquery:

$('#btnorder1').click(function () { $("#col3").append($("<div>").load("order1.aspx"));});

when click order button, loads order form on page. if click again, loads another. works fine.

when click save button on invoice page, need fill order objects(three objects, each representing different type of order) values right order , save database. have database saving code done, don't know how can cycle through each order form on page fill in appropriate object. need able compare different instances of each order, can check dates filled in on order not conflicting suspect able when fill object.

your cycle beingness messed due page-life cycle, , due accesibility or events objects appended dom. (and due multiple jquery functions , scripts loaded each page).

please, take @ usercontrols http://www.codeproject.com/articles/1739/user-controls-in-asp-net

instead of having 1 aspx page each type, have "usercontrol" per type. after doing that, consider having 1 usercontrol parameters manage ordertype.

c# jquery asp.net ajax

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -