Thank you. That's what I tried but I'm still getting mismatched brace
exceptions on the first brace of the Application_Start code block when the
converted code is used in the global.asax as follows...
void Application_Start(Object sender, EventArgs e)
{
void Profile_MigrateAnonymous(object sender, ProfileMigrateEventArgs e)
{
ASP.HttpProfile anonymousProfile = Profile.GetProfile
(e.AnonymousId);
if (anonymousProfile.Cart != null)
{
Profile.Cart = anonymousProfile.Cart;
}
}
}
It seems to be the presence of the Profile_MigrateAnonymous code block. I've
commented that code block out while leaving the statements within the
Profile_MigrateAnonymous code block uncommented and vice-versa. When the
Profile_MigrateAnonymous code block (and its braces) are commented the
squiggly underlined Application_Start code block brace mismatch dissappears.
<%= Clinton Gallagher
"Tom Shelton" <to*@YOUKNOWTHEDRILLmtogden.com> wrote in message
news:OW**************@TK2MSFTNGP12.phx.gbl...
On 2004-11-25, clintonG <cs*********@REMOVETHISTEXTmetromilwaukee.com>
wrote:
This code has to go into the global.asax Application_Start code block.
I'm just not getting this one right and the web-based code converters
choke on it. Can somebody rewrite this VB snippet to C# for me?
Sub Profile_MigrateAnonymous(ByVal sender As Object, ByVal e As
ProfileMigrateEventArgs)
Dim anonymousProfile As ASP.HttpProfile =
Profile.GetProfile(e.AnonymousId)
If anonymousProfile.Cart IsNot Nothing Then
Profile.Cart = anonymousProfile.Cart
End If
End Sub
void Profile_MigrateAnonymous (object sender, ProfileMigrateEventArgs e)
{
ASP.HttpProfile anonymousProfile =
Profile.GetProfile (e.AnonymousId);
if (anonymousProfile.Cart != null)
{
Profile.Cart = anonymousProfile.Cart;
}
}
HTH
--
Tom Shelton [MVP]