CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 11/21/2003 9:35:12 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 95 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
dermot_carey
Asp.Net User
new HttpResponse class, please help11/21/2003 9:35:12 PM

0/0

I am wondering if there is an easy way to do what I?m trying to do.

I have created an inherited System.Web.UI.Page class (let's call it class CustomPage) then all my aspx pages inherit.

What i would love to be able to do is add some parameter to the end of each Response.Redirect that is made. So as I am developing the front end if i call

public class Page1 : CustomPage
{

private void Page_Load(object sender, System.EventArgs e)
{
Response.Redirect("MyPage.aspx");
}
}

The page is then actually redirected to:
MyPage.aspx?Param1=Value1

My first thought was to create a new object that inherits the HttpResponse object. Then override the Redirect method to place the parameters on the end of the string before passing the string to the base class. Then I could create a "New" Parameter in CustomPage and point it to my new HttpResponse object.
Well since HttpResponse is sealed, scratch that idea.

So does anyone have a way of doing what I?m trying to do. Basically what I?m trying to do is ensure that certain parameters are passed on every Redirect without having to worry about it every time a Resposne.Redirect is called at the UI Level.

Do I have to build up a completely new HttpResponse object? Is there some kind of event that is thrown on Response.Redirect?
sedgewick
Asp.Net User
Re: new HttpResponse class, please help11/21/2003 10:24:09 PM

0/0

why not just make a special method in your base, called Redirect...
protected void Redirect(string url)
{
Response.Redirect(url + "?Param1=Value1");

}

then in Page1, do


this.Redirect("MyPage.aspx");
Get ready to blast your energy levels into high gear with Sedgewick Energy Drink. High powered adaptogenic herbs mixed with potent levels of B-vitamins and...

Please disregard the contents of this post.
master4eva
Asp.Net User
Re: new HttpResponse class, please help11/21/2003 10:27:16 PM

0/0

The only way is to ensure that each parameter is in the normal Response.Redirect... unfortunately, you can not change the internals of ASP.NET. However, soon as you are using a base page implementation, just create a new protected method to handle the redirects and at the end, you use the normal response.redirect method.
-- Justin Lovell
sedgewick
Asp.Net User
Re: new HttpResponse class, please help11/21/2003 10:38:22 PM

0/0

how is that different than exactly what I said above? - Its not moderation delay
Get ready to blast your energy levels into high gear with Sedgewick Energy Drink. High powered adaptogenic herbs mixed with potent levels of B-vitamins and...

Please disregard the contents of this post.
master4eva
Asp.Net User
Re: new HttpResponse class, please help11/21/2003 10:48:32 PM

0/0

Hey it is the moderation. I wrote that post in two minutes and when I arrived back to this very page, your post was not here. It is the delay of moderation that made us go off... same thing happened in the other thread that you suggested aspnet_regiis but it did not change my content of the post. You know the behaviour of my postings that I told you beforehand.
-- Justin Lovell
dermot_carey
Asp.Net User
Re: new HttpResponse class, please help11/21/2003 11:03:55 PM

0/0

i know I could very easily just add a new method, but I was just thinking from a multi-developer environment, in a big project.
I guess I'll probably have to just make the method and make sure that it's always used, but I?m sure sooner or latter someone is going to forget and use the Response class.
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Java Servlet Programming Authors: Jason Hunter, William Crawford, Pages: 753, Published: 2001
Java Servlet and JSP Cookbook: Practical Solutions to Real-world Problems Authors: Bruce W. Perry, Pages: 723, Published: 2004
Beginning Java EE 5 Authors: Kevin Mukhar, Chris Zelenak, James L. Weaver, Jim Crume, Pages: 641, Published: 2005
Expert One-on-One J2EE Design and Development: J2EE Design and Development Authors: Rod Johnson, Pages: 742, Published: 2002
Java and XML: Solutions to Real-world Problems Authors: Brett McLaughlin, Justin Edelson, Pages: 465, Published: 2007
Struts: Essential Skills Authors: Steven Holzner, Pages: 408, Published: 2004
Java Web Development Illuminated Authors: Kai Qian, Richard Allen, Mia Gan, Robert Brown, Pages: 702, Published: 2006
Enjoying Web Development with Tapestry: [put the fun back into J2EE application development] Authors: Ka Iok Tong, Ka Iok Kent Tong, Pages: 495, Published: 2006
More Java Pitfalls: 50 New Time-Saving Solutions and Workarounds Authors: Michael C. Daconta, Kevin T. Smith, Donald Avondolio, W. Clay Richardson, Pages: 455, Published: 2003
Javaサーブレッドプログラミング Authors: Jason Hunter, ジェイソンハンター, ジェイソンハンター Jason Hunter ウイリアムクロフォード William Crawford, William Crawford, ウイリアムクロフォード, Hidemoto Nakada, Pages: 816, Published: 2002

Web:
new HttpResponse class, please help - ASP.NET Forums Do I have to build up a completely new HttpResponse object? Is there some kind of event that is thrown on Response.Redirect? ...
HttpResponse Class The members of the HttpResponse class are exposed via the intrinsic Response object, ... about this site, please send us a note. You can help support aspxtreme.
Safari Books Online - 0596005202 - ASP.NET in a Nutshell, 2nd Edition NET in favor of new properties and methods exposed by the HttpResponse class (or , in some cases, by other functionality available in ASP.NET). ...
KBAlertz.com: A new overload is added to the TransmitFile method ... Dec 7, 2006 ... A new overload for the TransmitFile method of the HttpResponse class is included in Microsoft ASP.NET 2.0. This new overload lets you ...
Mailing list archives Subject, RE: Please Help - ClassCastException ... HttpServletRequest request, HttpServletResponse response) throws Exception { PostForm pForm = (PostForm) ...
my image tag will not call servlet please help (Architect ... Please CLICK HERE to go to the new location. next oldest topic · next newest topic ... httpServletResponse.sendError(HttpServletResponse. ...
Re: totally new to FOP -Please help me httpServletResponse) throws ServletException, IOException { // set up a FOP driver ... Re: totally new to FOP -Please help me The Web Maestro ...
Re: My map is looking streched... Please help me: msg#00094 I have attached the map image, please help me how to resolve this. ... HttpServletRequest req, > >> HttpServletResponse res) > >> throws ServletException, ...
[Json-rpc-java] How to set cookie on AJAX response? registerLocalArgResolver(HttpServletResponse.class, + HttpServletResponse.class, new HttpServletResponseArgResolver() ); LocalArgController. ...
Django | Request and response objects | Django Documentation class HttpResponseBadRequest¶. New in Django 1.0. Acts just like HttpResponse but uses a 400 status code. class HttpResponseNotFound¶: Acts just like ...

Videos:
Creating a Simple J2EE Servlet Using IRAD for WebSphere 7.0 You can see the full screen, high resolution tutorial, here: http://www.thebookonhibernate.com/j2ee/index.jsp?link=01creatingservlets Creating a S...
Creating a Simple J2EE Servlet Using IRAD for WebSphere You can see the full screen, high resolution tutorial, here: http://www.thebookonhibernate.com/j2e... Creating a Simple Servlet Using IRAD This f...
Obtaining Textfield Input from the User Here's the original, full screen, full resolution video: http://www.thebookonhibernate.com/j2ee/sunjavasamplecodetutorialsmockexams.jsp?link=06useri...
Using the HttpSession Object: Servlet and JSP Tutorials J2EE You can see the full screen, high resolution tutorial, here: http://www.thebookonhibernate.com/j2ee/index.jsp?link=03httpsessionswf State Managemen...
Creating Servlet Filters with Rational Application Developer You can find the original, high resolution video tutorial on creating Java ServletFilters right here: http://jpa.thebookonhibernate.com/j2ee/index.j...
How To Break Web Software - A look at security vulnerabilities in web software Google TechTalks April 13, 2006 Mike Andrews Mike Andrews is a senior consultant who specializes in software security and leads the web application...




Search This Site:










linkbutton - custom

serialization to viewstate -- when are typeconverters required?

i get an "the type 'system.web.ui.usercontrol' has no event

dll compilation

help with server control terminology

how to make a slide control?

is there something like a designersurface_onchange event??

include user controls in string?

iframe control - guidance recommendation

custom web control

user control properties

free web host

how do i enable thead/tbody output for a system.web.ui.webcontrols.table?

composite control simple custom property problem

http://www.freewebdot.com/

web custom control and project time support...please help me!

i need to improve my fop pdf server control. help me out for the probs. im facing...

saving object state over postback

control reference and createchildcontrols

new web control designers

accessing user control from a page

design time support for composite controls

control creation in oninit sub

build an extender provider component for asp.net

accessing properties in datagrid

multiple <@ register lines

suggestions for hosting a small business that needs .net 2.0 + mssql2005 (with full-text search)

extending datagrid control

httpcontext in class

looking for providers that will help our customer install our software?

  Privacy | Contact Us
All Times Are GMT