Register  |  Login




Advertisement

Start Your Own Q&A Site

Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.

Question

Status: Open Points: 25 Time: 07:53 - Sep 04, 2008  

ajapprog

how to call function in .aspx.cs from ascx.cs

i have function in .ascx.cs i want to use this function in page.aspx
thank u

Categories

Answer Discussion
Tutorials

 

Mustafa

Date:: Mar 26, 2009

Time:: 06:54

You can not access a function from usercontorl class unless you have instance of it in your page and the function is public. e.g. (usercontorl1.function1())

otherwise, you should have that function in a class inside AppCode

admin

Date:: Apr 17, 2009

Time:: 09:24

The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points.

The Quomon Team

vikasstyagi

Date:: Aug 12, 2009

Time:: 05:15

WebUserControl1.Test("a", "b");

here Test is the function on the ascx.cs page

and WebUserControl1 is the ascx page which is used in the aspx page

dontnetkid

Date:: Oct 22, 2009

Time:: 06:35

I don't see any reason why you want to do this. But if you want you can use events and delegates.

sunilverma16

Date:: Aug 10, 2010

Time:: 09:59


create that function "public" and then you can use that function like this
in ascx.cs
puplic void somefunction(arguments)
{
// your code here
}

in aspx.cs

controlObject.somefunction(arguments);

lnj888

Date:: Apr 20, 2011

Time:: 00:12

WebUserControl1.Test("a", "b");

lnj888

Date:: Apr 24, 2011

Time:: 23:24

You need have that function in a class inside AppCode
http://www.holeesoft.com/blu-ray-ripper....

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Tutorials cannot be submitted until the Answer Discussion is complete.

Submit answers in the Answer Discussion area

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Experts

View More

Rank

Expert

Points

1.

nidhi

10279

2.

oracleofDelphi

6493

3.

rcastagna

5596

4.

LAGM

4848

5.

PeterNZ

3487

6.

gonzalo

2840

7.

Mason

2770

8.

jgivoni

2303

9.

xarcus

1820

10.

Anpanman

917

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es