Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2008, 03:44 AM
Authorized User
 
Join Date: May 2007
Posts: 95
Thanks: 5
Thanked 0 Times in 0 Posts
Default Unknown runtime error

Hi All

I am making a web app using C#,Sql Server 2005, i m using Visual Studio 2005 Pro.
The problem is that whenever i m clicking on Go Button or Submit, Internet Explorer is throwing an error as: Unknown runtime error. My piece of code works fine on Mozilla Firefox. It is not working in IE.
Here is the design page code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Exit_Consolidation.aspx.cs" Inherits="Exit_Consolidation" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>:: Welcome to Exit Consolidation ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<script language="JavaScript" src="includes/Validate_support.js" type="text/JavaScript"></script>
<link href="images/style.css" rel="stylesheet" type="text/css"/>
<link href="includes/style.css" type="text/css" rel="stylesheet"/>
<link href="Includes/HRstyle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<%--<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" onload="MM_preloadImages('images/b_home_over.gif','images/b_submit_hover.gif','images/b_cancel_hover.gif','images/b_reset_hover.gif')">
--%><form id="form1" runat="server">
<asp:ScriptManager ID="ScrExit" runat ="server" />
<asp:UpdatePanel ID="Updt" runat ="server">
<ContentTemplate >
<table cellspacing="0" cellpadding="0" width="100%" border="0">

  <tbody>

  <tr>
    <td width="100%" valign="top"><form name="LeaveAppFrm" action="leave_applicationvam.asp?frmName=ADD"
      method="post"/>
        <table cellspacing="0" cellpadding="0" width="100%" border="0">
          <tbody>
          <tr>
            <td width="100%" height="13" align="left" bgcolor="528CAD"><table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tbody>
                  <tr>
                    <td width="22%" height="40"><img src="images/hr_logo5.gif" width="133"/></td>
                    <td width="73%" height="30" align="right"><marquee
                  style="FONT-SIZE: 8pt; COLOR: #ffffff; FONT-FAMILY: Verdana"
                  scrolldelay="150" width="600" height="13">
                      </marquee></td>
                    <td valign="middle" align="center" width="5%" height="30"><a href="body.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','images/b_home_over.gif',1)"><img src="images/b_home.gif" alt="Home" name="Image2" width="22" height="22" border="0"/></a></td>
                  </tr>
                </tbody>
            </table></td>
          </tr>
          <tr>
            <td width="100%" align="middle" valign="top" bgcolor="#ffffff"><div align="center">
              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="mtt">
                <tr>
                  <td width="3%" bgcolor="528CAD">&nbsp;</td>
                  <td width="94%" align="center"><table width="98%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <%--<td width="50%" align="left"><strong>Name</strong></td>--%>
                      <td align="right"><span class="hl"><strong><%=System.DateTime.Now.DayOfWee k%>,&nbsp;<%=Session["MonthName"]%>&nbsp;<%=System.DateTime.Now.Day%>,&nbsp;<%=Syst em.DateTime.Now.Year%></strong></span>&nbsp;&nbsp;</td>
                    </tr>
                  </table></td>
                  <td width="3%" height="25" bgcolor="528CAD">&nbsp;</td>
                </tr>
              </table>
            </div></td>
          </tr>
          <tr>
            <td align="center" valign="top" bgcolor="#ffffff"><table width="94%" cellpadding="0" cellspacing="0" class="mtt" style="border-left:1px solid #528CAD; border-right:1px solid #528CAD; border-bottom:1px solid #528CAD">
              <tbody>
              <center>
                <tr>
                  <td width="100%" height="25" align="left"
                bgcolor="50B2EA"><p class="ss" style="MARGIN-LEFT: 11px"><strong><span
                  style="LETTER-SPACING: 1pt">Exit Consolidation </span></strong></p></td>
                  <td align="right" width="100%" bgcolor="50B2EA"
                height="25"><p style="MARGIN-RIGHT: 15px">&nbsp;</p></td>
                </tr>
                <tr align="center">
                  <td width="100%" height="1" colspan="2"></td>
                </tr>


                <tr align="center" valign="top">
                  <td colspan="2">&nbsp;</td>
                </tr>

                <tr align="center" valign="top">
                  <td colspan="2"><table class="mtt" border="0" width="98%" cellspacing="1" bgcolor="#c1c1c1" cellpadding="2">
                    <tr>
                      <td width="10%" align="left" bgcolor="#e1e1e1" height="25px"><strong>Emp No.: </strong></td>
                      <td align="left" bgcolor="#ffffff">
                      <asp:TextBox ID = "txtEmp" runat = "server" CssClass = "textfield1" MaxLength = "10"/>
                        <asp:Button ID = "btnGo" runat = "Server" CssClass="but2" Text = "Go" OnClick="btnGo_Click" />
                        </td>
                    </tr>
                  </table></td>
                </tr>


                <tr align="left" valign="bottom">
                  <td height="30" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;<strong>Associ ate Details </strong></td>
                </tr>
                <tr align="center" valign="top">
                  <td colspan="2"><table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#c1c1c1" class="mtt">
                    <tr bgcolor="#e1e1e1">
                      <td width="20%" align="left"><strong>Name:</strong></td>
                      <td align="left" bgcolor="#FFFFFF">
                      <asp:Label ID = "lblName" runat = "server" />
                      </td>
                      <td width="20%" align="left"><strong>Level:</strong></td>
                      <td align="left" bgcolor="#FFFFFF">
                      <asp:Label ID = "lblLevel" runat = "server" />
                      </td>
                    </tr>
                    <tr bgcolor="#e1e1e1">
                      <td align="left"><strong>Gender:</strong></td>
                      <td align="left" bgcolor="#FFFFFF">
                      <asp:Label ID = "lblGender" runat = "server" />
                      </td>
                      <td align="left"><strong>Vertical:</strong></td>
                      <td align="left" bgcolor="#FFFFFF">
                      <asp:Label ID = "lblVert" runat = "server" />
                      </td>
                    </tr>
                    <tr bgcolor="#e1e1e1">
                      <td align="left"><strong>Department:</strong></td>
                      <td align="left" bgcolor="#FFFFFF">
                      <asp:Label ID = "lblDept" runat = "server" />
                      </td>
                      <td align="left"><strong>DOJ:</strong></td>
                      <td align="left" bgcolor="#FFFFFF">
                      <asp:Label ID = "lblDoJ" runat ="server" />
                      </td>
                    </tr>
                    <tr bgcolor="#e1e1e1">
                      <td align="left"><strong>Last Working Date: </strong></td>
                      <td align="left" bgcolor="#FFFFFF">
                      <asp:TextBox ID = "txtLWD" runat = "server" CssClass = "textfield1" MaxLength = "10" />
                      <cc1:CalendarExtender ID = "CalendarExtender1" runat = "server" TargetControlID="txtLWD" Format="dd/MM/yyyy">
                      </cc1:CalendarExtender>
                      </td>
                      <td align="left"><strong>Length of Service: </strong></td>
                      <td align="left" bgcolor="#FFFFFF">
                      <asp:TextBox ID = "txtLoS" runat = "server" CssClass = "textfield1" MaxLength = "10" ReadOnly ="true" />
                      </td>
                    </tr>
                  </table></td>
                </tr>
                <tr align="center" valign="top">
                  <td colspan="2">&nbsp;</td>
                </tr>
                <tr align="left" valign="top">
                  <td colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;<strong>Reason s for Leaving </strong></td>
                </tr>
                <tr align="center">
                  <td colspan="2"><table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#c1c1c1" class="mtt">
                    <tr>
                      <td width="5%" align="center" bgcolor="#e1e1e1"><strong>Sel</strong></td>
                      <td align="left" bgcolor="#e1e1e1"><strong>Reason</strong></td>
                      <td align="left" bgcolor="#e1e1e1"><strong>Reason Type </strong></td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                      <td align="center">
                      <asp:CheckBox ID = "chkCareer" runat = "server" CssClass="dd" OnCheckedChanged="chkCareer_CheckedChanged"/>
                      </td>
                      <td align="left">
                      <asp:Label ID = "lblCareer" runat ="server" Text = "Career Progression" />
                      </td>
            <td align="left">
                      <asp:DropDownList ID = "ddlCareer" runat ="server" CssClass="dd" OnSelectedIndexChanged="ddlCareer_SelectedIndexCha nged">
                      <asp:ListItem Selected="True">Select</asp:ListItem>
                      <asp:ListItem>Primary Reason</asp:ListItem>
                      <asp:ListItem>Secondary Reason</asp:ListItem>
                      <asp:ListItem>Not a Reason</asp:ListItem>
                      </asp:DropDownList>

            </td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                      <td align="center">
                      <asp:CheckBox ID = "ChkPay" runat = "server" CssClass="dd" OnCheckedChanged="ChkPay_CheckedChanged"/>
                      </td>
                      <td align="left">
                      <asp:Label ID = "lblPay" runat ="server" Text = "Pay" />
                      </td>
                      <td align="left">
                      <asp:DropDownList ID = "ddlPay" runat ="server" CssClass="dd" OnSelectedIndexChanged="ddlPay_SelectedIndexChange d">
                      <asp:ListItem Selected="True">Select</asp:ListItem>
                      <asp:ListItem>Primary Reason</asp:ListItem>
                      <asp:ListItem>Secondary Reason</asp:ListItem>
                      <asp:ListItem>Not a Reason</asp:ListItem>
                      </asp:DropDownList>
                      </td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                      <td align="center">
                      <asp:CheckBox ID = "ChkRole" runat = "server" CssClass="dd" OnCheckedChanged="ChkRole_CheckedChanged"/>
                      </td>
                      <td align="left">
                      <asp:Label ID = "lblRole" runat ="server" Text = "Role" />
                      </td>
                      <td align="left">
                      <asp:DropDownList ID = "ddlRole" runat ="server" CssClass="dd" OnSelectedIndexChanged="ddlRole_SelectedIndexChang ed">
                      <asp:ListItem Selected="True">Select</asp:ListItem>
                      <asp:ListItem>Primary Reason</asp:ListItem>
                      <asp:ListItem>Secondary Reason</asp:ListItem>
                      <asp:ListItem>Not a Reason</asp:ListItem>
                      </asp:DropDownList>
                      </td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                      <td align="center">
                      <asp:CheckBox ID = "ChkCul" runat = "server" CssClass="dd" OnCheckedChanged="ChkCul_CheckedChanged" />
                      </td>
                      <td align="left">
                      <asp:Label ID = "lblCul" runat ="server" Text = "Culture" />
                      </td>
                      <td align="left">
                      <asp:DropDownList ID = "ddlCul" runat ="server" CssClass="dd" OnSelectedIndexChanged="ddlCul_SelectedIndexChange d">
                      <asp:ListItem Selected="True">Select</asp:ListItem>
                      <asp:ListItem>Primary Reason</asp:ListItem>
                      <asp:ListItem>Secondary Reason</asp:ListItem>
                      <asp:ListItem>Not a Reason</asp:ListItem>
                      </asp:DropDownList>
                      </td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                      <td align="center">
                      <asp:CheckBox ID = "ChkMT" runat = "server" CssClass="dd" OnCheckedChanged="ChkMT_CheckedChanged"/>
                      </td>
                      <td align="left">
                      <asp:Label ID = "lblMT" runat ="server" Text = "Manager/Team" />
                      </td>
                      <td align="left">
                      <asp:DropDownList ID = "ddlMT" runat ="server" CssClass="dd" OnSelectedIndexChanged="ddlMT_SelectedIndexChanged ">
                      <asp:ListItem Selected="True">Select</asp:ListItem>
                      <asp:ListItem>Primary Reason</asp:ListItem>
                      <asp:ListItem>Secondary Reason</asp:ListItem>
                      <asp:ListItem>Not a Reason</asp:ListItem>
                      </asp:DropDownList>
                      </td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                      <td align="center">
                      <asp:CheckBox ID = "ChkPR" runat = "server" CssClass="dd" OnCheckedChanged="ChkPR_CheckedChanged" />
                      </td>
                      <td align="left">
                      <asp:Label ID = "lblPR" runat ="server" Text = "Personal Reasons" />
                      </td>
                      <td align="left">
                      <asp:DropDownList ID = "ddlPR" runat ="server" CssClass="dd" OnSelectedIndexChanged="ddlPR_SelectedIndexChanged ">
                      <asp:ListItem Selected="True">Select</asp:ListItem>
                      <asp:ListItem>Primary Reason</asp:ListItem>
                      <asp:ListItem>Secondary Reason</asp:ListItem>
                      <asp:ListItem>Not a Reason</asp:ListItem>
                      </asp:DropDownList>
                      </td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                      <td align="center">
                      <asp:CheckBox ID = "ChkBrand" runat = "Server" CssClass="dd" OnCheckedChanged="ChkBrand_CheckedChanged" />
                      </td>
                      <td align="left">
                      <asp:Label ID = "lblBrand" runat ="server" Text = "Brand" />
                      </td>
                      <td align="left">
                      <asp:DropDownList ID = "ddlBrand" runat ="server" CssClass="dd" OnSelectedIndexChanged="ddlBrand_SelectedIndexChan ged">
                      <asp:ListItem Selected="True">Select</asp:ListItem>
                      <asp:ListItem>Primary Reason</asp:ListItem>
                      <asp:ListItem>Secondary Reason</asp:ListItem>
                      <asp:ListItem>Not a Reason</asp:ListItem>
                      </asp:DropDownList>
                      </td>
                    </tr>
                  </table></td>
                </tr>
                <tr align="center">
                  <td colspan="2">&nbsp; </td>
                </tr>
                <tr align="center">
                  <td height="30" colspan="2">
                  <asp:Button ID = "btnSubmit" runat = "server" CssClass = "but2" Text = "Submit" OnClick="btnSubmit_Click" />
                  <asp:Button ID = "btnCancel" runat = "server" CssClass = "but2" Text = "Cancel" OnClick="btnCancel_Click" />
                    </td>
                </tr>
                <tr align="center">
                  <td colspan="2">&nbsp;</td>
                </tr>
              </center>
            </table></td>
          </tr>
          <tr>
            <td align="middle" valign="top" bgcolor="#ffffff">&nbsp;</td>
          </tr>

        </table>

    </td>
    </tr>
  </tbody>
</table>
 </ContentTemplate>
 </asp:UpdatePanel>
</form>

</body>
</html>



Tell me at what line modification should be made and what modification should me done.

 
Old April 8th, 2008, 03:52 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Seriously, you have to be joking. We are not mind readers, nor are we slaves to do your bidding.
Posting a big chunk of code and saying "I get an error, fix it" is not the way things work on these forums.

I suggest trying to get a little more information about exactly what is happening. You can do this by turning on script debugging, or installing a tool to aid this:

http://blogs.msdn.com/ie/archive/200...-explorer.aspx
(There may be more by now as this article is from mid-2007).



/- Sam Judson : Wrox Technical Editor -/
 
Old April 8th, 2008, 03:59 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Wow - I was actually shocked to read that post.

Well said Sam. :)

Rob
The Developing Developer
Currently Working Towards: MCAD C#
My Blog: http://www.robzyc.spaces.live.com
<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>
 
Old April 8th, 2008, 04:10 AM
Authorized User
 
Join Date: May 2007
Posts: 95
Thanks: 5
Thanked 0 Times in 0 Posts
Default

It looks that u didnt got my point, my application is working fine in firefox browser. There is no compile time error, its a runtime error and that too i have checked line by line code using the debugger. No error anywhere in .CS File. IE throws error in design page[ ERROR ON PAGE], thats why i copied the whole code of design page , thinking perhaps that if AJAX control is creating a problem.

 
Old April 8th, 2008, 04:16 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

I did get your point - that is why I gave you a link to IE debugging tools, so you could get more details on the error in IE.
You also pasted the design page - which is not what IE sees, for that you should do a 'View Source' in IE to view the source (and please do not post the entire view source).

If you think the AJAX stuff is causing the error then try removing it - I notice you are just using an UpdatePanel, so that can be removed easily.


/- Sam Judson : Wrox Technical Editor -/
 
Old April 8th, 2008, 04:27 AM
Authorized User
 
Join Date: May 2007
Posts: 95
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Well i did used View Source, the line number which IE shows error doesnt exist(line number out of range) and as far as AJAX is considered, i m using it, so i cant remove it. I m clueless about this error, thats why i posted it, anyway i apologize for any inconvenience caused.

 
Old April 8th, 2008, 04:43 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

I beg to differ - the AJAX elements in your page can easily be removed without changing the functionality of the page - The UpdatePanel is used to allow the page to be refreshed in small segments, the fact that you wrap the entire page in a ContentTemplate probably does away with most of this benefit, but thats another issue.

The CalenderExtender likewise just allows the user to pick a date from a pretty UI calendar, again, this can be removed without affecting the ability to submit the form.

If you believe the AJAX is causing the problem, but you are not prepared to try removing it then I suggest you either find someone else to look at the problem or give up.

/- Sam Judson : Wrox Technical Editor -/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in File UNKNOWN.RPT babarrana Crystal Reports 0 September 17th, 2007 05:47 AM
Unknown Error "-1" when opening new website MzMoody BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 November 10th, 2006 01:08 PM
Unknown Error!!!! arun_sunmic Pro Java 2 July 25th, 2006 11:24 PM
MS Access Unknown Error mrahman Beginning VB 6 2 February 9th, 2006 03:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.