Architecture :: Add Event/function To All Pages In Existing App?

Jan 26, 2011

c#/vb webapp. I'm working on a very old app with a ton of pages. I want to add a function to every page's PreRender. If this application was designed properly from the start, it would use a MasterPage, or would at least inherit all pages from a BasePage other than System.Web.UI.Page.The goal is that every aspx page's PreRender should trigger a call to FooFunction(). I'd like to have this done all in one page, to avoid opening every single .aspx file and changing it's inheritence / pasting FooFunction() / some other time waster.Is there a way to do this in .net? Can you point me in the direction of any design/discussion articles?

View 5 Replies


Similar Messages:

Can One Configure IIS So ASP Pages Can Run Aside Our Existing PHP-pages

Sep 8, 2010

We run a PHP-website through IIS v6.0 (windows server 2003). The site was configured by an ex-collegue. Now I have to add a couple of existing
ASP-pages to the site. I have tried this, but it won't work. When calling an ASP page in Internet Explorer, we get the following message : "The page cannot be found". However, if I rename the asp-pages to php, it does work fine, but this is not the way I want it to work (I like to keep the asp pages, to be sure they work well). Can one configure IIS so ASP pages can run aside our existing PHP-pages ?

View 1 Replies

Architecture :: Function Implementation In 3-tier Architecture?

Apr 28, 2010

I have implemented the 3-tier architecture project; DAL, BAL, and presentation layer are three layers in it. I am going to implement the following scenario:

Presentation layer calls to a function in the BAL layer which returns 2 string variable, and in turn this function from BAL layer calls to a DAL layer function which also returns 2 string variable. How can I implement the above scenario?

View 2 Replies

C# - How To Override The Same Function On Multiple Pages (Render Function)

Jan 26, 2011

Take the following scenario. I have multiple ASPX pages. Login, Logout, Main, Messages, etc... They all inherit from System.Web.UI.Page of course. For all the pages, I want to override the Render method from the Page class. I could easily copy and paste the same code into each page like so:

protected override void Render(HtmlTextWriter writer)
{
//Code Logic Here
}

But if I had many pages, lets say 20, maintaining the code in each page could get very time consuming and error prone.That made me think a bit and I thought okay lets try this...override the function in each page but call a static function. That way changing the static function would result in a change for every page.Which works fine... But its not really nice and clean, having to override like that on every single page.

View 3 Replies

Architecture :: Sequence And Class Diagram Of An Existing Website?

Nov 17, 2010

I want to undertand and change an existing website which was written long time back. It cntains a lot of code and I dont know where to start as there is no dicumentation.Is there any way by which i can create a class diagram and sequence diagram of the existing one as I want to incorporate all the existing functionalities in the new one and dont miss out anyone. Only way I know is to debug the current application and go through whole of the code individually. Is there any way out by which I can undertand the current application quickly?

View 1 Replies

Converting Existing Classic ASP Pages

Mar 24, 2011

I am trying to convert existing classic ASP webpages to ASP.NET. I dont have a lot of knowledge in the area. This is what i currently have. I use a Microsoft Access to pass data to tables in a Oracle Database. I then have .asp pages that pull data from the oracle tables. I just recently installed Visual Studio 2010 Ultimate and i want to start converting my .asp pages to .aspx. I have never used Visual Studio before so I am stuck at the beginning of this process. Do i start by creating a new ASP.NET Web application? I know there are things i need to add to the Webconfig file too but i dont know exactly what.

View 6 Replies

Php - MVC Architecture Decision - Refactor Existing Approach Into Controllers / Views And Database Access

Feb 12, 2011

Consider the following scenario: Page written in classic ASP or PHP, which is rendering a data report (series of HTML tables for simplicity). There is one main database query and then multiple sub queries as the page renders. The report is split into sub panels, which correlate to a sub query. Therefore:

Main database query. Loop over result. For each row, execute sub query and render report panel. How would you architect a similar report using the MVC pattern? This can be split into two parts: Efficiency at database level of multiple queries, which are dependent on values from an outer query. If all data was processed and prepared in the controller, would this also be deemed inefficient if looping within the controller and then again in a view to render. Could sub controllers be used or sub panels, which encapsulate smaller sections of logic i.e. loading data and rendering report panel.

View 2 Replies

Web Forms :: How To Apply Master Pages To Existing Page

Apr 17, 2010

I've more than 12 pages without any master pages applied to them. these pages have heavy javascripting and loads of controls on them. now i require to add these pages under a master page. how can i achieve this with minimal of effort?

View 3 Replies

Installation :: Running Aspx Pages To An Existing Php Website?

Mar 3, 2010

I have a client that currently has a comprehensive php website (with a huge amount of functionality built in).

We have been requested to link into our c#/SQL server application and pull information from the SQL database and display this on the existing website.

I would like to do this as aspx pages. However, I do not want to re-create the complete existing website. I would like to add the aspx functionality onto the current website.

View 1 Replies

SQL Server :: Change Existing Holiday Calculation Function?

Oct 14, 2010

What changes to the function below are needed to achieve those requirements:- If you pass the same date, then 1 will be returned as the number of days- Return '5' when passing 18.10.2010 to 22.10.2010 (Mo-Fr.)- Return '0.5' when passing same date with (n) hours difference e.g. from 18.10.2010 08:00:00 and 18.10.10 12:00:00 (maybe I should ask start a new threand for this last one)

[Code]....

View 1 Replies

JQuery :: Progress Bar Plugin / Implement Into Existing Function?

Mar 18, 2011

I have the following function that works great. The screen Dims until the response is returned to the user. However, because the process could be quite long, I have been asked if I can place a progress bar in the middle of the screen whilst it's dimmed to give the user an idea of how long the process is going to take and so that they dont think the browser has hung.

Can anybody suggest a good Progress bar plug in with an idea of how to implement into my existing function. I'm using VS2010.

[Code]....

View 10 Replies

Call On Onclient Event But Keeps Saying Function 'function Not Defined'

Dec 3, 2010

i got a javascript function that i want to call on <aspImabutton onclient event but it keep saying function not defined.

[Code]....

View 2 Replies

Architecture :: What Is The Function Of Abstract Class

Oct 24, 2010

what is the function of abstract class, why design pattern need to build BLL and DAL

anyone give an example for my reference as I am getting strat to build my web-based project

View 3 Replies

Architecture :: Overriding Aspx Pages - Best Design?

Jan 25, 2011

I would like to provide my client with a aspx pages, with code behind provided, etc. But in some cases they will want to write their own markup - I'm thinking of having 2 directories [siblings of each other], one for the pages I provide, and the other for their custom markup. At page serve time, check to see if the client wrote their own markup and if so use it. Otherwise use the default provided.

In a nutshell I would like for my clients to be able to modify the pages I provide, but if they blow it up have a very easy way to back it out. Or to put it in a more positive light, allow them to override my pages easily.

View 5 Replies

Architecture :: Unable To Use Two Master Pages At A Same Time?

Jul 29, 2010

Cant we use two master pages at a same time? for example one for background and another one for menu.. if u know. send me the sample code r link..

View 3 Replies

Architecture :: Passing Objects Between Aspx Pages?

Jan 21, 2010

I have an application that uses DataContracts/DataMembers and Serialization to store information entered in a tab control. There are 8 tabs in the control (therefore 8 aspx pages). The final tab is used to write the information to disk.I am trying to understand: When should serialization be used in a web app? The objects are stored in memory not on disk. Is this another means of passing objects between aspx pages? If so when should serialization be used vs. session objects? How long is the serialized object retained in memory?Can I get a simple example of how to serialize in one page and deserialize the object in another page?I've read many blogs regarding serialization but have yet to find a simple example and none of them explain when serialization should be used vs. session objects?

View 3 Replies

Architecture :: Host ASPX Pages In Application?

Dec 15, 2010

i want my application to provide a web ui for remote access, but i do not host that web page in IIS, because i do not want everyone install IIS on their home PC.

i spend some reading the asp.net pipeline, but still not figure how to load the .aspx file in my code.

View 5 Replies

C# - Inviting Users To A Pre-existing Facebook Event ?

Dec 13, 2010

What is the best way to invite users to an existing event? We'd like to do the following:

create an event, make it public while on our (external) website give the user a dialog (fb:multi-friend-selector) to select their friends to invite to the event

It's established the new Graph API can't be used (http://bugs.developers.facebook.net/show_bug.cgi?id=10070), but the documentation for the REST API (http://developers.facebook.com/docs/reference/rest/events.invite) implies that it's not possible to invite users to existing events.

provide any clarity on this I'd be grateful - reading the vague and contradictory facebook documentation is getting me nowhere.

Specifically, who/where/how should the event be created? - and how can I then invite users to that event from an external website?

View 1 Replies

Architecture :: Use Separate Pages Or Make One With Multiple Views?

Nov 15, 2010

I'm working on a webforms aspx app (not MVC) and I'm not sure if I should just create separate pages or somehow make multiple views on the same aspx page for the following scenario: Basically, I need to give the user the option to view a set of data a few different ways (essentially different group by's from a data perspective)... the data is always the same, its just a matter of how to arrange on the page...

each way I need to present the data will essentially consist of 2 repeaters, one nested inside the other. The outer repeater will display a nice header section with the nested repeater showing the list of items under that heading. view by book title (title is outer repeater, with the book list being the nested repeater, yes, multiple books with same title for this example - the app has nothing to do with books, this is just to illustrate)

Book Title: A Good Story
Author - Publisher - ISBN
Dan Johnson - Smith Publishing - kjdkjfd99898989
Susan Day - Smith Publishing - aa777fd99ff
Greg Greger - Corp XYZ - amkj897hgrt554

Book Title: Another Good Story
Author - Publisher - ISBN
Frank Franky - Corp XYZ - kj3kjfd9d9980
Jason Cambel - Smith Publishing - 7g7fddddttt
Jill Breker - Smith Publishing - d9ddt523321

Or, view books by publisher (here the publisher would be the outer repeater and the list, with different fields compared to first view, is the nested repeater.

Publisher: Smith Publishing
Title - Author - ISBN
A Good Story - Dan Johnson - kjdkjfd99898989
A Good Story - Susan Day - aa777fd99ff
Another Good Story - Jason Cambel - 7g7fddddttt
Another Good Story - Jill Breker - d9ddt523321

Publisher: Corp XYZ
Title - Author - ISBN
A Good Story - Greg Greger - amkj897hgrt554
Another Good Story - Frank Franky - kj3kjfd9d9980

so what do I do here? Just making separate pages is simple and would work, but is there something else I should be considering? There will be 3 different views, so 3 pages total if I went that route. Something is making me think I should be doing this all within one aspx page? maybe just toggling the visible property of the repeater controls? but then I was thinking each of these repeater controls is databound, and I assume even if they are not visible they still incurred database hits to get the data, right? and that could be bad?

View 4 Replies

Forms Data Controls :: DataGrid's - Call A Server - Side Function On ItemDataBound Event Except Client - Side Function

Jan 10, 2010

I Getting A Problem In DataGrid's ItemDataBound Event. I Am Calling A JavaScript Function In DataGrid's ItemDataBound Which Retrun The CellIndex And RowIndex Number On Which UserClick After That I Am Re-Binding The DataGrid With jQuery Function After That ItemDataBound Event Not Working. I Want To Call The Same Function Again. Is Their Any Method To Call A Server-Side Function On ItemDataBound Event Except Client-Side Function..

View 4 Replies

Architecture :: Extract Large Data From SQL To CSV Using Asynchronous Function

Oct 16, 2010

I have a table growth 100000row per day, I'm facing many problems to export data from this table using ASP.net page.

I don't know how to apply this scenario:

Senerio 1:

1- run Asynchronous function to export data from SQL for specified period to CSV file (without locking the table)

2- Refresh page every 5 sec in order to track the status of extracting data

3- compress the file

4- Stop refreshing and showing the download link in order to download the compressed file

or

Senerio 2:

1- run Asynchronous function to export data from SQL for specified period to CSV file (without locking the table)

3- compress the file

4- send the compressed file by Email

View 3 Replies

Architecture :: To Create A Function To Send An Email To All Users In A Particular Role?

Jan 20, 2011

I'm comfortable sending emails to individuals in ASP.NET, but recently have needed to create a function to send an email to all users in a particular role.

A couple of problems I'm having are:

My shared hosting allows 200 emails per hour. Although not an issue at the moment it could be very soon, so how can I 'throttle' my application to not send out more emails then I'm allowed to?

If want to loop through the emails and send the messages in the background of my app. Rather than have a situation where logging off or closing the browser stops the process. point me in the direction of some articles about this type of thing, my searching so far hasn't given me great results.

View 2 Replies

Send Mail Function In ASP Pages?

Apr 26, 2010

know that it is easy to send e-mail in web page with ASP.Net. We do not need any component on this.But do we need any component in asp pages in order to send e-mail? I found this page
http://www.aspemail.com/register.html

View 3 Replies

Architecture :: Need A Function Or Store Procedure Which Returns Only Locations Near By 10kms Of Given Longitude/latitude Parameters?

Feb 26, 2010

I have many locations stored with addresses and longitude/latitude information in my database.I need a function or store procedure which returns only locations near by 10kms of given longitude/latitude parameters.It is not neccesary to be a sql query but I am fine with any other solution.

View 6 Replies

Jquery - User Control PageLoad Function Not Fire On Some Of Pages?

Mar 10, 2011

I'm working on an ASP.net application.I had a problem with a user control I'd designed called LocationSelector. It worked great, but I couldn't use it within an ASP:UpdatePanel. I learned, by browsing SO, that I needed to put my in-line javascript in an external file and register it with ScriptManager so that there are no Response.Write calls in the Javascript.Next, I discovered that the control worked at first, but when I enclosed it within the ASP:UpdatePanel, it would stop functioning after the first AJAX postback. I read that to fix that, I needed to replace my $(document).ready call with function pageLoad() which is automatically executed with each ASP.net page load.

Several of my pages in my ASP.net application work fine (and I was really impressed with how well the framework seemed to drive the application). However, to my dismay, I discovered that my LocationSelector control no longer works at all on three of my pages. The HTML renders, but the pageLoad (which uses jQuery to bind events on control elements) does not fire.I verified this but putting alert('pageLoad'); as the first line of my pageLoad function. On the pages that work, I see the alert. On the pages that don't work, I never see the alert, even on the initial page load.What kind of problem could be causing the pageLoad function on my user control LocationSelector to execute on some pages, but not others?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved