Showing posts with label event. Show all posts
Showing posts with label event. Show all posts

Saturday, March 31, 2012

Server Side Code..

How to decide to use WebControls.Button or HtmlControls.HtmlInputButton
controls in a web application. When I am getting the clicked event handler
for both of them on the server side. Thanks,

NelsonHi Nelson,

I would definitely go with the <asp:Button> in your case and use code
behind. This makes it easy to hook up your code if you are using an IDE
like VS.Net and will seperate your code from your UI. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
news:evpYtjRyEHA.3224@.TK2MSFTNGP14.phx.gbl...
> How to decide to use WebControls.Button or HtmlControls.HtmlInputButton
> controls in a web application. When I am getting the clicked event handler
> for both of them on the server side. Thanks,
> Nelson
>

Server Side Code..

How to decide to use WebControls.Button or HtmlControls.HtmlInputButton
controls in a web application. When I am getting the clicked event handler
for both of them on the server side. Thanks,
NelsonHi Nelson,
I would definitely go with the <asp:Button> in your case and use code
behind. This makes it easy to hook up your code if you are using an IDE
like VS.Net and will seperate your code from your UI. Good luck! Ken.
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
"Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
news:evpYtjRyEHA.3224@.TK2MSFTNGP14.phx.gbl...
> How to decide to use WebControls.Button or HtmlControls.HtmlInputButton
> controls in a web application. When I am getting the clicked event handler
> for both of them on the server side. Thanks,
> Nelson
>
>

Server Side Controls in ASP.NET

Hi,

I have an aspx page with some server side textboxes.

I have a button onmy page which allows users to add data
to a database.

In my onclick event for my button when I try and get teh
value from the textbox using..

Dim myString as String = textbox1.text

...it is blank.

When I do a..

Dim myString = Request.Form("textbox1")

...I get the value the user enetered.

I have declared my textbox as a control in my codebehind.

And it is an asp.net textbox.

Any ideas why this is?

This is baffling me.

Kerri.Have you added the "runat=server" attribute to the template HTML for the
text box?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Kerri" <anonymous@.discussions.microsoft.com> wrote in message
news:017401c39cc4$12c55070$a501280a@.phx.gbl...
> Hi,
> I have an aspx page with some server side textboxes.
> I have a button onmy page which allows users to add data
> to a database.
> In my onclick event for my button when I try and get teh
> value from the textbox using..
> Dim myString as String = textbox1.text
> ..it is blank.
> When I do a..
> Dim myString = Request.Form("textbox1")
> ..I get the value the user enetered.
> I have declared my textbox as a control in my codebehind.
> And it is an asp.net textbox.
> Any ideas why this is?
> This is baffling me.
> Kerri.

Server side Event handler for DIV click?

Is it possible with ASP.NET C# to establish a click event on a DIV element so that when the user clicks on the DIV it can postback to the server and initate a click event for that DIV element? I am currently wrapping my content with a <A runat=server> to achieve the onserverclick effetc.

In fact if i wanted to create a server side event hanler for dynamic content, how would one go about establishing this. I can see .NET makes heavy use of __doPostBack on the client side but i just dont see how it can initate an event handler on the server side.

Tx

Hi quantass0,

You can handle the click event on a DIV as the code following (div1 is the id of the DIV element)

public

partialclass_Default : System.Web.UI.Page,IPostBackEventHandler

{

protectedvoid Page_Load(object sender,EventArgs e)

{

div1.Attributes[

"onclick"] = ClientScript.GetPostBackEventReference(this,"ClickDiv");

}

protectedvoid Div1_Click()

{

// Do something

}

#region

IPostBackEventHandler Memberspublicvoid RaisePostBackEvent(string eventArgument)

{

if (!string.IsNullOrEmpty(eventArgument))

{

if (eventArgument =="ClickDiv")

{

Div1_Click();

}

}

}

#endregion

}

Hope this helps


Excellent info. Thank you!

Hi, i wonder if you could help me, i'm trying to get this work inside a user control. It doesnt implementSystem.Web.UI.Page,

i have tried the followng code but i cant pick up the event

Sorry, this is converted to vb as well

Code behind is

Imports System.ReflectionPartialClass editControllerBarInherits System.Web.UI.UserControlImplements IPostBackEventHandlerProtected Sub Page_Load(ByVal senderAs Object,ByVal eAs EventArgs) cancelDiv.Attributes("onclick") =Me.Page.ClientScript.GetPostBackEventReference(Me,"ClickDiv")End Sub Protected Sub Div1_Click()' Do somethingEnd Sub Private MembersAs IPostBackEventHandlerPublic Sub RaisePostBackEvent1(ByVal eventArgumentAs String)Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEventIf Not String.IsNullOrEmpty(eventArgument)Then If eventArgument ="ClickDiv"Then Div1_Click()End If End If End Sub

the div on the user control looks like this

 <div class="btnCancel" runat="server" id="cancelDiv"> </div>
 
could you help please? 

Thursday, March 29, 2012

server side kepress event on textbox

HI There,
I have a webform and I am wanting to call a function from a textbox control
located on the webform when a key is pressed. Can this be done in server sid
e.
already know do like this
on ASPX page within javascript tags
<script laguage=javascript>
function trapKeypress() {
alert (window.event.keyCode);
}
</script>
and in .vb page of the .aspx page ..'
textbox1.attributes.item("onkeypress") = "javascript:trapKeypress();"
Can I do it without using JavaScript .
RegardsYou can submit the form in trapKeypress(). This will cause a postback and
you can pass to the server a sort of info telling what exactly caused the
postback. This will resemble a server event. You can't avoid using
javascript on the client side. How can server know what is happening in the
browser?
Eliyahu
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:1D18DAD2-5F54-4F85-8E27-8F63BB1F3B7E@.microsoft.com...
> HI There,
> I have a webform and I am wanting to call a function from a textbox
control
> located on the webform when a key is pressed. Can this be done in server
side.
> already know do like this
> on ASPX page within javascript tags
> <script laguage=javascript>
> function trapKeypress() {
> alert (window.event.keyCode);
> }
> </script>
> and in .vb page of the .aspx page ..'
> textbox1.attributes.item("onkeypress") = "java script:trapKeypress();"
> Can I do it without using JavaScript .
> Regards

server side kepress event on textbox

HI There,

I have a webform and I am wanting to call a function from a textbox control
located on the webform when a key is pressed. Can this be done in server side.
already know do like this

on ASPX page within javascript tags
<script laguage=javascript>
function trapKeypress() {
alert (window.event.keyCode);
}
</script
and in .vb page of the .aspx page ..'
textbox1.attributes.item("onkeypress") = "javascript:trapKeypress();"

Can I do it without using JavaScript .

RegardsYou can submit the form in trapKeypress(). This will cause a postback and
you can pass to the server a sort of info telling what exactly caused the
postback. This will resemble a server event. You can't avoid using
javascript on the client side. How can server know what is happening in the
browser?

Eliyahu

"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:1D18DAD2-5F54-4F85-8E27-8F63BB1F3B7E@.microsoft.com...
> HI There,
> I have a webform and I am wanting to call a function from a textbox
control
> located on the webform when a key is pressed. Can this be done in server
side.
> already know do like this
> on ASPX page within javascript tags
> <script laguage=javascript>
> function trapKeypress() {
> alert (window.event.keyCode);
> }
> </script>
> and in .vb page of the .aspx page ..'
> textbox1.attributes.item("onkeypress") = "javascript:trapKeypress();"
> Can I do it without using JavaScript .
> Regards

Server side operation from javascript

Hi
I want to do some server side operation on close of a browser. I created
a server side html button and invoked a post back event on close of
browser something like
__doPostBack('btnUnlock',''); What I realised this is unreliable as the
operation is yet not completed when the browser has closed and
essentially the thread would have been killed. Is there any way in
javascript wherein I post a message to the server, wait for the response
and then the window closes something like send message and wait for the
response.
Regards
RJN
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!RJN <rjn@.yahoo.com> wrote in news:#uju2BxoEHA.556@.tk2msftngp13.phx.gbl:

> Is there any way in
> javascript wherein I post a message to the server, wait for the response
> and then the window closes something like send message and wait for the
> response.
>
There is no way to ensure this will fire. Client side javascript can be
disabled or stopped in many ways.
Instead, use the Session End event handler in the Global.asax.
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/spot18/[/url]
Yes, there is a very simple way. Post your message (it doesn't have to be
hacker style _doPostBack, it can be any value passed to the server in one of
legal and documented ways) and, in the response, get server-side to emit
window.close() javascript statement.
Eliyahu
"RJN" <rjn@.yahoo.com> wrote in message
news:%23uju2BxoEHA.556@.tk2msftngp13.phx.gbl...
> Hi
> I want to do some server side operation on close of a browser. I created
> a server side html button and invoked a post back event on close of
> browser something like
> __doPostBack('btnUnlock',''); What I realised this is unreliable as the
> operation is yet not completed when the browser has closed and
> essentially the thread would have been killed. Is there any way in
> javascript wherein I post a message to the server, wait for the response
> and then the window closes something like send message and wait for the
> response.
> Regards
> RJN
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!

Server side operation from javascript

Hi

I want to do some server side operation on close of a browser. I created
a server side html button and invoked a post back event on close of
browser something like
__doPostBack('btnUnlock',''); What I realised this is unreliable as the
operation is yet not completed when the browser has closed and
essentially the thread would have been killed. Is there any way in
javascript wherein I post a message to the server, wait for the response
and then the window closes something like send message and wait for the
response.

Regards

RJN

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!RJN <rjn@.yahoo.com> wrote in news:#uju2BxoEHA.556@.tk2msftngp13.phx.gbl:

> Is there any way in
> javascript wherein I post a message to the server, wait for the response
> and then the window closes something like send message and wait for the
> response.

There is no way to ensure this will fire. Client side javascript can be
disabled or stopped in many ways.

Instead, use the Session End event handler in the Global.asax.

--
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Yes, there is a very simple way. Post your message (it doesn't have to be
hacker style _doPostBack, it can be any value passed to the server in one of
legal and documented ways) and, in the response, get server-side to emit
window.close() javascript statement.

Eliyahu

"RJN" <rjn@.yahoo.com> wrote in message
news:%23uju2BxoEHA.556@.tk2msftngp13.phx.gbl...
> Hi
> I want to do some server side operation on close of a browser. I created
> a server side html button and invoked a post back event on close of
> browser something like
> __doPostBack('btnUnlock',''); What I realised this is unreliable as the
> operation is yet not completed when the browser has closed and
> essentially the thread would have been killed. Is there any way in
> javascript wherein I post a message to the server, wait for the response
> and then the window closes something like send message and wait for the
> response.
> Regards
> RJN
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Saturday, March 24, 2012

server unavailable error with no messages in event viewer

I have an application that was originally in asp but is now moved to
ASP.Net. To deploy it, I just changed the default file in IIS for the
web folder to point to the new aspx file. Occasionally I see a "Server
unavailable" error. There is nothing in the event log that suggests any
related error or warnings. This application also has a part of it that
is still in ASP, would that cause any issues?
Most of the links online for this error are about application pool but
I see no messages in the event log, so I dont think that is an issue.
Thanks for any ideas.
PritiTry re installing ASPNET using commands -i to install and -u to uninstall
and then restart IIS
Can't remember the commands.
Patrick
<pphadke@.gmail.com> wrote in message
news:1134153210.219405.269640@.g43g2000cwa.googlegroups.com...
> I have an application that was originally in asp but is now moved to
> ASP.Net. To deploy it, I just changed the default file in IIS for the
> web folder to point to the new aspx file. Occasionally I see a "Server
> unavailable" error. There is nothing in the event log that suggests any
> related error or warnings. This application also has a part of it that
> is still in ASP, would that cause any issues?
> Most of the links online for this error ayre about application pool but
> I see no messages in the event log, so I dont think that is an issue.
> Thanks for any ideas.
> Priti
>

Server Unavailable Error Message.

When I run my .aspx page I get a server inavailabel error.
It appears to be some kind of odbc error.. Here are the details:
In the event log it says:
1. aspnet_wp.exe (PID: 7012) stopped unexpectedly.
2. The system has called a custom component and that component has failed and generated an exception. This indicates a problem with the custom component. Notify the developer of this component that a failure has occurred and provide them with the information below.
Component Prog ID: 0[ODBC][Env 164f14e8]
Method Name: IDispenserDriver::CreateResource
Process Name: aspnet_wp.exe
The serious nature of this error has caused the process to terminate.
Exception: C0000005
Address: 0x1F7D5694
Call Stack:
odbc32!CloseODBCPerfData + 0x32E

Does anyone know how I might try to correct this.
ThanksCould you post some code to give us a better idea of what you are doing.

Thanks
Greg
Greg,
I am connection to db2 an filling retrieveing some data.
Here is my code.

Try

Dim str_Db2ConnString As String = "dsn=dev04;UID=ddb2btch;PWD=Db2$btch#02;"
Dim connDb2 As New Odbc.OdbcConnection(str_Db2ConnString)

Dim str_sql As String = "SELECT b.cust_num, b.credit_line_num, a.cust_short_name, b.usd_util_amt, b.activation_date FROM db2ib.ibtcust a, db2ib.ibtcred b where a.cust_num = b.cust_num order by a.cust_short_name"

' OdbcDataAdapter Represents a set of data commands and a database connection that are used to fill the DataSet and update the data source.
Dim myDA As System.Data.Odbc.OdbcDataAdapter = New System.Data.Odbc.OdbcDataAdapter(str_sql, connDb2)

' the datset is what holds the results from the database.
Dim myDS As DataSet = New DataSet
myDA.Fill(myDS, "Custs")
Dim objTable As DataTable
Dim objRows(), objRow As DataRow
objTable = myDS.Tables("Custs")
'objRows = objTable.Select("cust_num = '254038'")
objRows = objTable.Select()
Dim iSub3 As Integer

Response.Write("Data from Db2" & "<br>")
For Each objRow In objRows
Response.Write(iSub3 & " & Cust_Num = " & objRow.Item(0) & "<br>")
iSub3 = iSub3 + 1
Next

' Try to load a second sql resultset into the dataset.
str_sql = "SELECT ibs_branch, short_name from db2ib.ibtbrch order by ibs_branch"

' OdbcDataAdapter Represents a set of data commands and a database connection that are used to fill the DataSet and update the data source.
Dim myDA2 As System.Data.Odbc.OdbcDataAdapter = New System.Data.Odbc.OdbcDataAdapter(str_sql, connDb2)

' the datset is what holds the results from the database.
'Dim myDS2 As DataSet = New DataSet
myDA2.Fill(myDS, "Branches")
'Dim objTable As DataTable
'Dim objRows(), objRow As DataRow
objTable = myDS.Tables("Branches")
objRows = objTable.Select()
'Response.Write("myDs.Tables.Count = " & myDS.Tables(0).TableName & "<br>")
iSub3 = 1
For Each objRow In objRows
Response.Write(iSub3 & " " & objRow.Item(0) & "<br>")
iSub3 = iSub3 + 1
Next

myDS.Dispose()
myDA.Dispose()
myDA2.Dispose()

connDb2.Close()
connDb2 = Nothing

Catch MyOdbcException As OdbcException
Dim i As Integer
Response.Write(MyOdbcException.ToString)
Catch MyException As Exception
Response.Write(MyException.ToString)
Catch SysException As NullReferenceException
Response.Write(SysException.ToString)

End Try


Thanks,
Brian

Thursday, March 22, 2012

Server.GetLastError() return null

Try using the Application_Error() event in Global.asax.
The context of the error will be available here. Your
application is handling the error, and thus there is no
LastError to Get.

hth,
-Christopher
http://weblogs.asp.net/CFrazierUsing Application_Error() does work. Thank-you!!!

What's confusing though is that I am simply trying to work
through an example on page 292 in "Developing WEB
Applications with Microsoft Visual Basic .NET and Visual
C# .NET". This example works with Server.GetLastError().
Perhaps book is wrong?

>--Original Message--
>Try using the Application_Error() event in Global.asax.
>The context of the error will be available here. Your
>application is handling the error, and thus there is no
>LastError to Get.
>hth,
>-Christopher
>http://weblogs.asp.net/CFrazier
>.

Tuesday, March 13, 2012

Server.MapPath fails in Session_End event

Hello,
I've found that if I try to do a Server.MapPath() in the Session_End event,
it fails with an exception.
is this right? any simple way to work round it?
is there any documentation that says what you can actually do in these
global.asax routines? - I've found out that Context is set to null but it
doesn't say that in any documentation I've seen
AndySee
http://msdn.microsoft.com/library/d...esevntonend.asp
"You cannot call the Server.MapPath
method in the Session_OnEnd script. "
Juan T. Llibre
ASP.NET MVP
===========
"Andy Fish" <ajfish@.blueyonder.co.uk> wrote in message
news:%23usAj9L$EHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hello,
> I've found that if I try to do a Server.MapPath() in the Session_End
> event, it fails with an exception.
> is this right? any simple way to work round it?
> is there any documentation that says what you can actually do in these
> global.asax routines? - I've found out that Context is set to null but it
> doesn't say that in any documentation I've seen
> Andy
>
One way you could work around this is in Application_Start, get the
Server.MapPath result and stick it in an Application variable, then you can
refer to the app var during session on end. Make sure NOT to use a Session
variable, as these are all already gone by the time you get to Session_End.
HTH.
"Andy Fish" <ajfish@.blueyonder.co.uk> wrote in message
news:%23usAj9L$EHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hello,
> I've found that if I try to do a Server.MapPath() in the Session_End
> event, it fails with an exception.
> is this right? any simple way to work round it?
> is there any documentation that says what you can actually do in these
> global.asax routines? - I've found out that Context is set to null but it
> doesn't say that in any documentation I've seen
> Andy
>
Thanks Juan. This documentation is actually for asp rather than asp.net but
it seems the same rule applies. Typical how I managed to want the one call
that isn't available :-(
I guess maybe it needs to have a user context to map a path - I don't really
see why though
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:OMukcMM$EHA.2572@.tk2msftngp13.phx.gbl...
> See
> http://msdn.microsoft.com/library/d...esevntonend.asp
> "You cannot call the Server.MapPath
> method in the Session_OnEnd script. "
>
>
> Juan T. Llibre
> ASP.NET MVP
> ===========
> "Andy Fish" <ajfish@.blueyonder.co.uk> wrote in message
> news:%23usAj9L$EHA.2180@.TK2MSFTNGP10.phx.gbl...
>
Hi, Andy.
re:
> Thanks Juan.
You're very much welcome.
re:
>This documentation is actually for asp rather than asp.net but it seems the
>same rule applies.
Yes. The intrinsic objects behave the
same way in ASP as in ASP.NET.
There's some additional events in ASP.NET, and some nuances
regarding the way some of them behave but, basically, the way
the intrinsic objects are handled is the same.
Juan T. Llibre
ASP.NET MVP
===========
"Andy Fish" <ajfish@.blueyonder.co.uk> wrote in message
news:uBp5MAO$EHA.4028@.TK2MSFTNGP15.phx.gbl...
> Thanks Juan. This documentation is actually for asp rather than asp.net
> but it seems the same rule applies. Typical how I managed to want the one
> call that isn't available :-(
> I guess maybe it needs to have a user context to map a path - I don't
> really see why though
>
> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
> news:OMukcMM$EHA.2572@.tk2msftngp13.phx.gbl...

Server.MapPath fails in Session_End event

Hello,

I've found that if I try to do a Server.MapPath() in the Session_End event,
it fails with an exception.

is this right? any simple way to work round it?

is there any documentation that says what you can actually do in these
global.asax routines? - I've found out that Context is set to null but it
doesn't say that in any documentation I've seen

AndySee
http://msdn.microsoft.com/library/d...esevntonend.asp

"You cannot call the Server.MapPath
method in the Session_OnEnd script. "

Juan T. Llibre
ASP.NET MVP
===========
"Andy Fish" <ajfish@.blueyonder.co.uk> wrote in message
news:%23usAj9L$EHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hello,
> I've found that if I try to do a Server.MapPath() in the Session_End
> event, it fails with an exception.
> is this right? any simple way to work round it?
> is there any documentation that says what you can actually do in these
> global.asax routines? - I've found out that Context is set to null but it
> doesn't say that in any documentation I've seen
> Andy
One way you could work around this is in Application_Start, get the
Server.MapPath result and stick it in an Application variable, then you can
refer to the app var during session on end. Make sure NOT to use a Session
variable, as these are all already gone by the time you get to Session_End.

HTH.

"Andy Fish" <ajfish@.blueyonder.co.uk> wrote in message
news:%23usAj9L$EHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hello,
> I've found that if I try to do a Server.MapPath() in the Session_End
> event, it fails with an exception.
> is this right? any simple way to work round it?
> is there any documentation that says what you can actually do in these
> global.asax routines? - I've found out that Context is set to null but it
> doesn't say that in any documentation I've seen
> Andy
Thanks Juan. This documentation is actually for asp rather than asp.net but
it seems the same rule applies. Typical how I managed to want the one call
that isn't available :-(

I guess maybe it needs to have a user context to map a path - I don't really
see why though

"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:OMukcMM$EHA.2572@.tk2msftngp13.phx.gbl...
> See
> http://msdn.microsoft.com/library/d...esevntonend.asp
> "You cannot call the Server.MapPath
> method in the Session_OnEnd script. "
>
>
> Juan T. Llibre
> ASP.NET MVP
> ===========
> "Andy Fish" <ajfish@.blueyonder.co.uk> wrote in message
> news:%23usAj9L$EHA.2180@.TK2MSFTNGP10.phx.gbl...
>> Hello,
>>
>> I've found that if I try to do a Server.MapPath() in the Session_End
>> event, it fails with an exception.
>>
>> is this right? any simple way to work round it?
>>
>> is there any documentation that says what you can actually do in these
>> global.asax routines? - I've found out that Context is set to null but it
>> doesn't say that in any documentation I've seen
>>
>> Andy
>>
>>
Hi, Andy.

re:
> Thanks Juan.

You're very much welcome.

re:
>This documentation is actually for asp rather than asp.net but it seems the
>same rule applies.

Yes. The intrinsic objects behave the
same way in ASP as in ASP.NET.

There's some additional events in ASP.NET, and some nuances
regarding the way some of them behave but, basically, the way
the intrinsic objects are handled is the same.

Juan T. Llibre
ASP.NET MVP
===========
"Andy Fish" <ajfish@.blueyonder.co.uk> wrote in message
news:uBp5MAO$EHA.4028@.TK2MSFTNGP15.phx.gbl...
> Thanks Juan. This documentation is actually for asp rather than asp.net
> but it seems the same rule applies. Typical how I managed to want the one
> call that isn't available :-(
> I guess maybe it needs to have a user context to map a path - I don't
> really see why though
>
> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
> news:OMukcMM$EHA.2572@.tk2msftngp13.phx.gbl...
>> See
>> http://msdn.microsoft.com/library/d...esevntonend.asp
>>
>> "You cannot call the Server.MapPath
>> method in the Session_OnEnd script. "
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> ===========
>> "Andy Fish" <ajfish@.blueyonder.co.uk> wrote in message
>> news:%23usAj9L$EHA.2180@.TK2MSFTNGP10.phx.gbl...
>>> Hello,
>>>
>>> I've found that if I try to do a Server.MapPath() in the Session_End
>>> event, it fails with an exception.
>>>
>>> is this right? any simple way to work round it?
>>>
>>> is there any documentation that says what you can actually do in these
>>> global.asax routines? - I've found out that Context is set to null but
>>> it doesn't say that in any documentation I've seen
>>>
>>> Andy