Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Firing a method on remote code

Posted on 2007-07-20
1
Medium Priority
?
183 Views
Last Modified: 2010-04-15
I have a suer control on my default.aspx page. On the OnCommand event in my user control i want to fire a specific method on the default.aspx.cs code behind...

Is this possible without putting some sort of logic in the pagload event of the default page?

can i use properties or something?

Nugs
0
Comment
Question by:Nugs
1 Comment
 
LVL 13

Accepted Solution

by:
joechina earned 1500 total points
ID: 19537283
if the method is a member of Page class, you can call it from your control just use Page property within your control.
if the method is not a member of Page class, you have two options:
1) create a basepage inherited from Page and add your method.
    make default.aspx page inherited from your base page instead of Page. Then in your control cast the Page to basepage and call the method
2) define a delegate in your user control, in your default page associate the method with the delegate  , then in your user control call the delegate.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question