| | |
Methods Between Pages is This Possible
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
Hi to all I'm new in the forum and also new in the ASP.Net programing.
I have the following question/problem:
I have a Page(lets say Page1.aspx) this page has the following code
I was wandering If can declare methods/objects in the Page2.aspx and the Page1.aspx will know them.
My problem is that in Page2.aspx I do some work(lets say 2+2) and then I want to Page1.aspx to get the result from Page2.aspx (ofcourse the 2+2 is a simplify example).
If this is possible how is this done, maybe you have a link where I can see an example.
Thanks
I have the following question/problem:
I have a Page(lets say Page1.aspx) this page has the following code
ASP.NET Syntax (Toggle Plain Text)
<iframe src="Page2.aspx" width="550" height="550"></iframe>
I was wandering If can declare methods/objects in the Page2.aspx and the Page1.aspx will know them.
My problem is that in Page2.aspx I do some work(lets say 2+2) and then I want to Page1.aspx to get the result from Page2.aspx (ofcourse the 2+2 is a simplify example).
If this is possible how is this done, maybe you have a link where I can see an example.
Thanks
Check this out. If it does not help, let the forum know.
http://msdn.microsoft.com/en-us/library/ms178139.aspx
http://msdn.microsoft.com/en-us/library/ms178139.aspx
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
No, this is not possible the way you are wanting. If you wish to do this, you would have to do a cross-page postback, then redirect back to the current page. So by doing this, you will make these functions somewhat unique to each page. Therefore you might as well make them into a class (a file with common code) and call it from there, or duplicate each function on each page. Repeated code is only hard for the programmer, as the viewer does not download extra code, use extra bandwidth, etc. It's just more difficult to maintain. My recommendations would be just to have the function on each page, unless you will be using it more than 2 or 3 times. If so, put it into a class, and place a reference to the class in your site. Call the class by calling: ClassName obj = new ClassName(); Then call your method within that class: obj.methodCall();
I answer pm's.
I answer questions.
I answer quickly.
I answer.
I answer questions.
I answer quickly.
I answer.
![]() |
Similar Threads
- Content Changes across pages via Drop-Down Box (ASP.NET)
- How to transfer values between ASP.NET pages (ASP.NET)
- dynamically update pages (HTML and CSS)
- CGI, without going anywhere? (Perl)
- Google goes to court to defend its ranking methods (Search Engine Optimization)
- draggable website pages within pages (IT Professionals' Lounge)
- accessing redirected pages through java crawler (Java)
- Google AdLinks and New Payment Methods! (Pay-Per-Click Advertising)
Other Threads in the ASP.NET Forum
- Previous Thread: given path's format is not supported -virtual directory problem-
- Next Thread: How Can Inter relate two forms ?
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child click commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu edit expose feedback flash flv form formatdecimal forms formview grid gridview homeedition hosting iframe iis javascript jquery listbox login menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news numerical objects order panelmasterpagebuttoncontrols radio ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql-server sqlserver2005 suse textbox tracking typeof unauthorized validation vb.net video videos view virtualdirectory vista visual-studio visualstudio web webarchitecture webdevelopemnt webservice xml youareanotmemberofthedebuggerusers






