473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Pitfalls of using a Global Response.Redirect

Hello.

I have a common area of a website that sales agents use. I got sick and
tired of typing response.redirect(path)
so i implemented a shared function in Global that i can call and all i have
to do is pass an AgentService enum to it and global will response.redirect
for me.

So instead of typing

Response.Redirect(Global.GetApplicationPath &
"Agents/Pages/Agent_Profile.apsx?aaid=45" etc etc)

I just type

Global.GotoAgentService(Me.response, AgentService.MessageCenter)

With intellisense filling in most of it for me.

Are there any pitfalls to redirecting from Global...given that it's such
special file. I dont want to get caught out by some invisible hand.

TIA
Richard
Nov 18 '05 #1
1 1585
No, this is ok. I don't know how much time you saved with this approach
since you could have accomplished the same by
Response.Redirect((string)AgentService.MessageCent er)
but if it pays the bills then it pays the bills...

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"spamfurnace" <sp*********@intermension.com> wrote in message
news:ey**************@TK2MSFTNGP12.phx.gbl...
Hello.

I have a common area of a website that sales agents use. I got sick and
tired of typing response.redirect(path)
so i implemented a shared function in Global that i can call and all i
have
to do is pass an AgentService enum to it and global will response.redirect
for me.

So instead of typing

Response.Redirect(Global.GetApplicationPath &
"Agents/Pages/Agent_Profile.apsx?aaid=45" etc etc)

I just type

Global.GotoAgentService(Me.response, AgentService.MessageCenter)

With intellisense filling in most of it for me.

Are there any pitfalls to redirecting from Global...given that it's such
special file. I dont want to get caught out by some invisible hand.

TIA
Richard

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: MostlyH2O | last post by:
Hi Folks, I'm having a hard time getting my Session_OnEnd event to fire in my global.asa. Here's what I have: <SCRIPT LANGUAGE=VBSCRIPT RUNAT=Server> SUB Session_OnStart Session.TimeOut =...
3
by: Steve Mauldin | last post by:
This is a standard ASP application that has several pages at the root withthe global.asa. I set a session variable session("accountid") = "123456" within an asp page and then response.redirect to...
6
by: Bill | last post by:
If I've got images in a directory, and I define that directory as an application directory (so I have a global.asa in it), what does my global.asa have to look like to prevent linking of images?
3
by: JP | last post by:
I need to be able to trap errors at the application level. I added this code to the Global.asax file. The code I wrote is supposed to get the last error that was generated and write to the event...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
5
by: Piz | last post by:
I've read a previous discussion about the same topic, but there's a difference. I call HttpContext.Current.Response.Redirect("file.txt") from a ownmade sub in the global.asax. That doesn't works,...
1
by: Anonieko | last post by:
Understanding and Using Exceptions (this is a really long post...only read it if you (a) don't know what try/catch is OR (b) actually write catch(Exception ex) or catch{ }) The first thing I...
0
by: daonho | last post by:
Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs) Dim strPath As String = HttpContext.Current.Request.Path() Dim cookie As...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.