I am trying to redirect to a page in a layout folder after data is added to my
list. However the Httpcontext.current is null in an eventhandler.
So my code looks like: Could anyone tell me what I need to do to get this
working ?
public override void ItemAdded(SPItemEventProperties properties)
{
base.ItemAdded(properties);
SPListItem item = properties.ListItem;
try
{
current = HttpContext.Current;
DisableEventFiring();
string EmployeeType = item["Employee Type"].ToString();
int RecordId = ARBA_HR.DataLayer.RecordAccess.SaveNewCase(EmployeeType);
item["Title"] = RecordId.ToString();
item.Update();
string strNewresiractionUrl =
"~site/_layouts/ARBA_HR.ApplicationPages/DocumentUpload.aspx?TrimRecordId=" +
RecordId;
//
http://542301-opti:30869/sites/ARBA/_layouts/ARBA_HR.ApplicationPages/DocumentUp\
load.aspx"
SPUtility.Redirect(strNewresiractionUrl, SPRedirectFlags.Trusted, current);
(
EnableEventFiring();
}
catch(Exception ex )
{
}
finally
{
}
}