or
Line 13: {
Line 14: RadSkinManager skin = (RadSkinManager)RadMenu1.Controls[0].FindControl("RadSkinManager1");
Line 15: Session["skinid"] = skin.Skin;
Line 16: }
Line 17: void Page_PreRender(object sender, EventArgs e)
RadGrid1.MasterTableView.EditMode =
GridEditMode.InPlace;
Regards
Devanand Jha
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
| //I cut out part of the code that does other things, but this is basically the same |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!IsPostBack) |
| //CoP is just a Session variable that is pulled into a property |
| LoadValues(CoP); |
| LoadTooltips(); |
| } |
| //Called after checkboxlist is built |
| private void LoadTooltips() |
| { |
| foreach (ListItem li in cblModules.Items) |
| { |
| var moduleHit = (from a in CoP.Modules where a.ModuleID == Int32.Parse(li.Value) select a.Description).FirstOrDefault(); |
| if (!string.IsNullOrEmpty(moduleHit)) |
| ToolTipify(li, moduleHit); |
| } |
| } |
| private void ToolTipify(ListItem li, string description) |
| { |
| ContentPlaceHolder con = (ContentPlaceHolder)Master.Master.FindControl("cphContent2"); |
| ContentPlaceHolder con1 = (ContentPlaceHolder)con.FindControl("cphCCMContent"); |
| RadToolTip tip = new RadToolTip(); |
| li.Attributes.Add("ID", Guid.NewGuid().ToString()); |
| tip.RelativeTo = ToolTipRelativeDisplay.Element; |
| tip.Text = description; |
| tip.TargetControlID = li.Attributes["ID"]; |
| tip.IsClientID = true; |
| con1.Controls.Add(tip); |
| } |
| private void OpenFile(int id) |
| { |
| try |
| { |
| Document doc = BLDocument.GetDocument(id); |
| if (File.Exists(doc.Metainformation.filepath)) |
| { |
| // Create New instance of FileInfo class to get the properties of the file being downloaded |
| FileInfo file = new FileInfo(doc.Metainformation.filepath); |
| // Clear the content of the response |
| Response.ClearContent(); |
| // LINE1: Add the file name and attachment, which will force the open/cance/save dialog to show, to the header |
| Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name); |
| // Add the file size into the response header |
| Response.AddHeader("Content-Length", file.Length.ToString()); |
| // Set the ContentType |
| Response.ContentType = ReturnExtension(file.Extension.ToLower()); |
| // Write the file into the response (TransmitFile is for ASP.NET 2.0. In ASP.NET 1.1 you have to use WriteFile instead) |
| Response.TransmitFile(file.FullName); |
| // End the response |
| Response.End(); |
| } |
| } |
| catch (Exception ex) |
| { |
| } |
| } |