javascript - jQuery AJAX and ASP.NET -


i have little problem... have asp.net website. have menu, done html , css. when click on home, ajax loads other content specified div element. working 100%.

in content loaded div element, have button. asp.net button.

when click on button, gives me "the resource cannot found." error.

there must missing. if dont understand, heres ajax:

//load home page on click. $(document).ready(function () {     $('.home').click(function () {         $("#content").load("html/home/home.aspx");     }); }); 

now aspx page loaded content div, displays button, btnadd:

<asp:panel id="pnladdnewblog" runat="server">     <asp:textbox id="txtaddnewblog" runat="server" textmode="multiline"></asp:textbox>     <br />     <asp:button id="btnadd" runat="server" text="add" /> </asp:panel> 

when click on button, error appears.

what want achieve to: when user clicks on button, text in txtaddnewblog gets added database. can achieve using c#... not if error in way. ideas?

the problem going form gets created. when make request, asp.net build form target home.aspx, not full path it. you're dumping form onto html page that's @ different level.

when form post, attempts post home.aspx, relative browser thinks is, 2 levels up, , doesn't find it.

i don't know if there's way - asp.net not meant handle kind of thing. can iframe. can wrap home.aspx content user control, , leave asp.net form on outer page. or may able manipulate form's target post right place. don't think of lot of fun.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -