Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi friends, Small requirment I have to show a div of another page (ASPX)
in my current page (ASPX) div.
I have done with this following method
JavaScript
$("#RightDiv").load('AddItem.aspx #ItemsDiv');

I am able to show that div in my current div but I am unable to access the controls of that div which I have added from another page? how can I access that controls in my current page with javscript only?

Please post me how can I do with this?
Thanks
Ganesh
Posted
Updated 20-Oct-12 7:20am
v2

I agree, you can't do with javascript.
But why don't try iframe..

<iframe width="750px" height="350px" src="AddItem.aspx"></iframe>

Hope it helps you.
 
Share this answer
 
Comments
Ganesh KP 21-Oct-12 8:52am    
Well in that senario I want only single div from that page but here it is pasting whole page which is not supposed to be and also I want to access the controls? can I do it?
Yvan Rodrigues 21-Oct-12 12:45pm    
But you could use jQuery to exclude all but the div you want.
Arunprasath Natarajan 21-Oct-12 23:41pm    
Yeah, Using JQuery you can. Active the div using its id onload of AddItem.aspx
But when you are accessing AddItem.aspx separately, make sure it should not affect your requirement.
Ganesh KP 24-Oct-12 12:41pm    
I have done I am able to extract the div from seperate page but I am unable to access the div in my current page where I pasted the cut div. I am asking how can I do that.Please post some sample example.
The short answer is you can't with Javascript.

The jQuery code is being executed in the client browser.

Your controls are executed in the .aspx page by IIS on the server.
 
Share this answer
 
Comments
Ganesh KP 21-Oct-12 8:49am    
Noah Boss we can do I have done but I am unable to get access the controls that 's I am asking how can I solve it?
Yvan Rodrigues 21-Oct-12 12:46pm    
Can you elaborate on what you mean by access the controls?

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