|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
unhandled exception in custom web control (PS:PSGridView)I am writing ASP.NET application with will use custom web control PS:PSGridView (insertable grid view) downloaded from http://www.codeproject.com/aspnet/PSGridView.asp. My problem is that when user inserts/edits/deletes row in the control, an error in occurs my application: Message: Raised exception of type'System.Web.HttpUnhandledException'. Stack: in System.Web.UI.Page.HandleError(Exception e) in System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) in System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) in System.Web.UI.Page.ProcessRequest() in System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) in System.Web.UI.Page.ProcessRequest(HttpContext context) in ASP.units_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mim-magazyn\ac16fb3b\d3ebb98f\App_Web_1xkbtcyc.2.cs:line 0 in System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() in System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Source: System.Web Is it possible to say something about the reason of error from this information? I have installed PSControls assembly and required files in bin subfolder. Here's how I use the PS:PSGridView control: File Units.aspx: <%@ Page Language="C#" MasterPageFile="~/MIM-Magazyn.master" AutoEventWireup="true" CodeFile="Units.aspx.cs" Inherits="Units" Title="Jednostki miary" %> <%@ Register Assembly="PSControls" Namespace="PS.Web.UI.WebControls" TagPrefix="PS" %> <asp:Content ID="Content" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server"> <asp:SqlDataSource ID="UnitsDataSource" runat="server" DeleteCommand="DELETE FROM Units WHERE Unit = @Unit" InsertCommand="INSERT INTO Units (Unit) VALUES (@Unit)" SelectCommand="SELECT Unit FROM Units" UpdateCommand="UPDATE Unit SET Unit = @Unit WHERE Unit = @Unit"> <DeleteParameters> <asp:Parameter Name="Unit" Type="String" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Unit" Type="String" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="Unit" Type="String" /> </InsertParameters> </asp:SqlDataSource> <PS:PSGridView ID="UnitsGridView" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="UnitsDataSource" ShowFooter="True" AddPrompt="" DataKeyNames="Unit" PageSize="12"> <PagerSettings Mode="NumericFirstLast" /> <HeaderStyle BackColor="#FFFFC0" /> <Columns> <asp:TemplateField></asp:TemplateField> <asp:BoundField DataField="Unit" HeaderText="Jednostka" SortExpression="Unit" ReadOnly="False" /> </Columns> </PS:PSGridView> </asp:Content> File Units.aspx.cs (code-behind): using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; /// <summary> /// Editable Grid View of units /// </summary> public partial class Units : System.Web.UI.Page { /// <summary> /// Initialize page and control /// </summary> protected void Page_Init(object sender, EventArgs e) { UnitsDataSource.ConnectionString = Admin.CurrentConnectionString; } /// <summary> /// Display units Grid View /// </summary> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) UnitsGridView.IsEditable = true; } } Could you help me please to find why the error occurs? Thanks in advance. /RAM/ You should first start with looking up support from the place you downloaded
the control. Usually, if you have the code, you would simply set the debug to break on any unhandled exception and go from there. Without the source code, you are probably going to need support help from the control author. -- Show quoteRegards, Alvin Bruney ------------------------------------------------------ Shameless Author Plug OWC Black Book 2nd Edition Exclusively on www.lulu.com/owc $24.99 "R.A.M." <r_ahims***@poczta.onet.pl> wrote in message news:ffccqe$1uv$1@news2.task.gda.pl... > Hello, > I am writing ASP.NET application with will use custom web control > PS:PSGridView (insertable grid view) downloaded from > http://www.codeproject.com/aspnet/PSGridView.asp. > My problem is that when user inserts/edits/deletes row in the control, an > error in occurs my application: > Message: Raised exception of type'System.Web.HttpUnhandledException'. > Stack: in System.Web.UI.Page.HandleError(Exception e) in > System.Web.UI.Page.ProcessRequestMain(Boolean > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) in > System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, > Boolean includeStagesAfterAsyncPoint) in > System.Web.UI.Page.ProcessRequest() in > System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) in > System.Web.UI.Page.ProcessRequest(HttpContext context) in > ASP.units_aspx.ProcessRequest(HttpContext context) in > c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET > Files\mim-magazyn\ac16fb3b\d3ebb98f\App_Web_1xkbtcyc.2.cs:line 0 in > System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() > in System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& > completedSynchronously) > Source: System.Web > > Is it possible to say something about the reason of error from this > information? > > I have installed PSControls assembly and required files in bin subfolder. > > Here's how I use the PS:PSGridView control: > > File Units.aspx: > > <%@ Page Language="C#" MasterPageFile="~/MIM-Magazyn.master" > AutoEventWireup="true" CodeFile="Units.aspx.cs" Inherits="Units" > Title="Jednostki miary" %> > > <%@ Register Assembly="PSControls" Namespace="PS.Web.UI.WebControls" > TagPrefix="PS" %> > > <asp:Content ID="Content" ContentPlaceHolderID="ContentPlaceHolder" > Runat="Server"> > > <asp:SqlDataSource ID="UnitsDataSource" runat="server" > > DeleteCommand="DELETE FROM Units WHERE Unit = @Unit" > > InsertCommand="INSERT INTO Units (Unit) VALUES (@Unit)" > > SelectCommand="SELECT Unit FROM Units" > > UpdateCommand="UPDATE Unit SET Unit = @Unit WHERE Unit = @Unit"> > > <DeleteParameters> > > <asp:Parameter Name="Unit" Type="String" /> > > </DeleteParameters> > > <UpdateParameters> > > <asp:Parameter Name="Unit" Type="String" /> > > </UpdateParameters> > > <InsertParameters> > > <asp:Parameter Name="Unit" Type="String" /> > > </InsertParameters> > > </asp:SqlDataSource> > > <PS:PSGridView ID="UnitsGridView" runat="server" AllowSorting="True" > > AutoGenerateColumns="False" DataSourceID="UnitsDataSource" > ShowFooter="True" AddPrompt="" DataKeyNames="Unit" PageSize="12"> > > <PagerSettings Mode="NumericFirstLast" /> > > <HeaderStyle BackColor="#FFFFC0" /> > > <Columns> > > <asp:TemplateField></asp:TemplateField> > > <asp:BoundField DataField="Unit" HeaderText="Jednostka" > SortExpression="Unit" ReadOnly="False" /> > > </Columns> > > </PS:PSGridView> > > </asp:Content> > > File Units.aspx.cs (code-behind): > > using System; > > using System.Data; > > using System.Configuration; > > using System.Collections; > > using System.Web; > > using System.Web.Security; > > using System.Web.UI; > > using System.Web.UI.WebControls; > > using System.Web.UI.WebControls.WebParts; > > using System.Web.UI.HtmlControls; > > /// <summary> > > /// Editable Grid View of units > > /// </summary> > > public partial class Units : System.Web.UI.Page > > { > > /// <summary> > > /// Initialize page and control > > /// </summary> > > protected void Page_Init(object sender, EventArgs e) > > { > > UnitsDataSource.ConnectionString = Admin.CurrentConnectionString; > > } > > /// <summary> > > /// Display units Grid View > > /// </summary> > > protected void Page_Load(object sender, EventArgs e) > > { > > if (!IsPostBack) > > UnitsGridView.IsEditable = true; > > } > > } > > Could you help me please to find why the error occurs? Thanks in advance. > > /RAM/ > > OK, So...
please look at the following my post: Hi, I have created web C# project in which I would like to use additionally custom web control (PSGridView) for which I have source code (VB files). I need to use in my web project assembly (PSControls.dll) generated from this VB files (according to sample program of the author of the control).: <%@ Register Assembly="PSControls" Namespace="PS.Web.UI.WebControls" TagPrefix="PS" %> (Source code of the control doesn't contain .ascx file.) I cannot simply add PSControls.dll to my project because I would like to debug VB files of control (I suspect that the files contain bug which I want to find - it is very important for me!). I don't know how to add source of custom web control to my web project. The source of custom web control consists of the following files: Application.Designer.vb Application.myapp AssemblyInfo.vb Messages.Designer.vb Messages.resx PSControls.vbproj PSControls.vbproj.user PSControls.vspscc PSGridView.vb Resources.Designer.vb Resources.resx Settings.Designer.vb Settings.settings Can I simply create subfolder in my web application folder and copy these files into it? I did it, but I receive an error in .aspx file using the custom web control (assembly cannot be found and loaded): <%@ Register Assembly="PSControls" Namespace="PS.Web.UI.WebControls" TagPrefix="PS" %> I think that assembly PSControls.dll was not generated (I don't see it). My question is: How to include web control source code to my project to be able to debug the code of control? Please help. Thanks in advance! /RAM/ |
|||||||||||||||||||||||