Click here to Skip to main content
15,901,505 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everybody.
i have a problem with ajax.
this is my code to load a page or a part of it in a div.
JavaScript
$("a").click(function (event) {
    var Rel = $(this).attr("rel");//The class name want to load from Default2.aspx
    if (Rel) {
        $('.Content_Part').load("Default2.aspx ." + Rel )
    }
    event.preventDefault();
});


my current page name is "Default.aspx" and the target page is "Default2.aspx", the problem is when i want to load something from Default2.aspx occur an error "500 internal server error" but when i want to load something from Default.aspx everything is OK.
i was using this function and it works fine but after 1 hour this problem occurred.
what's the problem?
thank you for your attention.
Posted
Comments
Naga KOTA 17-Oct-12 7:35am    
1)you are in default.aspx when user clicks on anchor it should redirect to default2.aspx.
2)You are trying to load something into default2.aspx.

What is the code written in default2.aspx
what do u want to display there?
Abolfazl Beigi 17-Oct-12 8:01am    
No, i have a div in default.aspx with class name "Content_Part" and i want to load a Table from default2.aspx with class name for example "myTable" into "Content_Part".

I found the problem, there was an error in target page, one of the
ASP.NET
<asp:label></asp:label>
has a mismatch closed quotation in the Text attribute.
that's error was : Label1 - The server tag is not well formed.
I think this is my problem, by the way my page is working fine now.
 
Share this answer
 
v2
Comments
TheCoolCoder 17-Oct-12 23:26pm    
Good that you were able to solve your problem, but i dont understand how anybody in code-project could have provided an answer. All you provided was a little code which was irrelevant in case of the problem you were facing..
hi check out these links
link1[^]
link2[^]
link3[^]
 
Share this answer
 

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