how to use functionality from existing aspx page in usercontrol?

I am trying to use existing functionality which is embedded in a aspx page. So I have controls on this page and code behind for it. What is the best way to reuse this functionality in a new ascx control? Or do I just have to copy everyting into the control?

-------------Problems Reply------------

Can you not just take the controls you want to use from the aspx page and turn those into a control? Then you can use that control wherever you like.

To access the page parent just written this.Page in your control. But for access to these methods, you must apply an interface to the aspx page. Views:0 Time:2012-01-19
Tags: c# 3.0

Related post

  • How to assign a master page to a existing .aspx page? 2010-02-16

    How to assign a master page to a existing .aspx page ? --------------Solutions------------- When assigning an existing .aspx page to a master page all the basic elements of a web-page now resides with the master page like head, body, title etc. Hence

  • Are there ASP.NET controls that can display an RSS feed inside an existing ASPX page? 2010-05-24

    Are there ASP.NET controls that can display an RSS feed inside an existing ASPX page? Ideally, it would render simply -- --------------Solutions------------- Try this tutorial

  • how to call the jquery function in .aspx page to usercontrols controls in 2011-01-27

    i have the following function in default.aspx.....i have webusercontrol which have 10 checkboxes and 1 button .... i want when i click on button1 of user control then it can access the function of default.aspx ...if i dragged the usercontrol

  • Call a function of parent aspx page from web user control 2011-12-22

    i have a aspx page on it i'm dynamically adding the web user controls in a placeholder. and know i have cancel button on the one user control and on click of that Cancel button i want to load other user control inside the aspx page (placeholder). how

  • access function in aspx page to master page 2010-09-06

    I have a.master and b.aspx . i have some functions in my aspx page. how to access that functions in a.master page. thank you --------------Solutions------------- Let's say, you want to call Foo from b.aspx from a.master. So first thing is that you ha

  • How to make call of C# function on aspx page.` 2011-06-27

    I have a function written on a class in c#. This function is returning the image src. Now i want to usethis in img tag like this way: <img src=<%=myclass.GetImageUrl('imagename')%> > is it posible in on aspx pages. Is there any ot

  • Best method for using existing .NET pages to update a portion of another page 2010-03-01

    I'm working on an ASP.NET WebForms CMS application, and having a bit of trouble solving a particular problem. For a while now, I've had a menu on the side of the admin console that shows a list of the pages, links, etc that make up the sitemap. Users

  • Port ASPX page to Sharepoint 2009-09-10

    I'm trying to port an existing ASPX page, which is part of an existing web site, into a new Sharepoint site. The ASPX page is a relatively simple form with some server-side controls, the ability to email form submissions and "Captcha". The current we

  • Missing aspx page is causing a global exception instead of redirecting to 404 page 2009-10-02

    I have a global exception handler in global.asax.cs file in the Application_Error handler which redirects to the error.aspx page. I also have the customError section in my web.config file. When I request a non existing aspx page, the 404.aspx file is

  • show an aspx page in content tag 2009-11-13

    I have a master page(MyMasterPage.master) with two content place holders. I wanna show another aspx page(MyHeader.aspx) in the 1st content place holder of a content page(MyContentPage.aspx) that uses my master page. --------------Solutions-----------

  • render / call .aspx page html into another .aspx page 2010-02-02

    in my application, i have implemented ajax 4.0 client templates currently my templates resides on same .aspx page. (say Main.aspx) but i want to externalize them.(ie all the HTML would go on another page) for that i have used $.get() like $.get("/Mod

  • Load httpmodule to .aspx page 2010-03-22

    I have created 3 textbox and 2 buttons programatically from HTTPModule. These buttons and textboxes are contained in an html table. It works correctly. I want know how load these table to existing .aspx page <div>***********</div> <div

  • javascript function call automatically on page onload instead on onclick 2010-06-03

    I am facing a very strange problem. I have javascript function in my aspx page that i call on the onclick event.but on one particular machine it always automatically called on body onload in infinite loop. Though I already remove all the caching and

  • how to place an aspx page inside update panel of another aspx page 2010-08-23

    is it possible to place an aspx page inside the update panel of another aspx page? if possible please let me know the way to do that. Thanks Rupa --------------Solutions------------- you could try out UFrame (Update Panel + IFrame), have a look at ht

  • I have an aspx page with master page and i want to asynchronous update the ContantPlaceHolder 2011-04-26

    I have an aspx page with master page and i want to asynchronous update the ContantPlaceHolder, i think about apdate panel, when the user submit the actions the update panel will close and open again with the solution, or to use an: ContentPlaseHolder

  • ASPX page within a .aspx page with iframe throws 500.23 error 2012-01-18

    I'm trying to embed a ChartModule.aspx page within a Default.aspx page using an iframe. The ChartModule has a button event which updates a chart. The ChartModule has its own ChartsModule.cs. I'm getting this error: HTTP Error 500.23 - Internal Server

  • Can you determine if a javascript function exist on an aspx page from code behind? 2012-02-17

    Seems like an easy thing, but no quite so apparently. I have a look up page that does a complicated search of a database (first name, last_name ...) that is used as a common look up across an application. It run through a colorbox popup and then call

  • Custom function shared by many aspx pages 2009-11-09

    I have a few aspx pages which displays GridView controls. In each control I use custom functions to format displayed data. I want to put those functions in one static class. I did like this: namespace MyNS { public static class FormatFunctions { publ

  • Can we call method that exist on aspx page through web service 2011-02-24

    Can we call a Method that exist on a aspx page through Web Services. It is like Reflection that method exists in dll form , but is it possible to call method from Aspx page if yes then please tell me how is it?:confused: --------------Solutions------

Copyright (C), All Rights Reserved.

processed in 0.167 (s). 11 q(s)