How to call a num pad in differnt pages as a function

Posted by Fahadullah1 under ASP.NET on 11/5/2012 | Points: 10 | Views : 686 | Status : [Member] | Replies : 1
Hello all,
I am creating an application where I have to use a numeric pad in different pages so, I want to create it once and call it on diferent pages.
could any one help me please?


Posted by: Allende on: 11/5/2012 [Member] Starter | Points: 25


If you are using WebForms you should try with Web User Control (right click->add->new item and select Web User Control).

Think about it, as a "piece" of reusable aspx code.

You can re-use it at ever page you need it and it's quite of simply, it just needs to be "registered" at the top of your webForm just like this

<%@ Register src="../common/myNumPad.ascx" tagname="numPad" tagprefix="myWUS" %>

And you will use it as this:

<myWUS:numPad id="someID" runa="serveer" />

In the ascx file, you can use almost any ASPX control/tag and it has it's own codebehind, so it's pretty useful.

My regards.

More info:

Fahadullah1, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response