Note that there are some explanatory texts on larger screens.

plurals
  1. POaspx reusable components
    primarykey
    data
    text
    <p>I'm not a beginner, but the more I think about this issue, the more I'm troubled for not finding an elegant solution.</p> <p>Writing a C# .NET web site, I realized that there are several components that I need use in different pages, with more or less the same functionality, and I want to find a way to write them once and then reuse.</p> <p>For example, a search box or several GridViews which I use in several pages. This "components" are built of several ASPX controls, methods, maybe some JavaScript, etc.. They are too complicated to be just duplicated and too specific to be created as controls.</p> <p>What do you think should be the best approach of writing an reusing such elements. These are the solutions I've found so far, each with each own drawbacks:</p> <ol> <li><p>iframe - as a matter of fact, with all of its problems works fine for me (for the search box). I wrote one aspx/cs page with all the search behavior (it's quite complicated) - and then on each page I want this search box, I add an iframe.</p></li> <li><p>Master pages - this one I've found quite tricky. I've found out you could write a nested master page, but I could not figure out how could that help me. The Master page method - sets the child page as the first page (which calls its parent Master). But in my case, I have the main page which has his child components.</p></li> </ol> <p>3.UpdatePanel - I could use UpdatePanel - and write a shared function that will populate it with the required components and code. Ok, that might work, but the code is very hard for maintenance (you need to write all the components manually with C#)</p> <p>Any idea ? Did I miss anything trivial solution . </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload