Click here to Skip to main content
12,457,493 members (60,959 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#3.0 C# ASP.NET
DataTable dtAttributes = objDAL.GetCPRAttributes();
        foreach (DataRow row in dTableSql.Rows)
            DataRow[] rows = dtAttributes.Select("Attributes='" + row["Attributes"] + "'");
            if (rows != null && rows.Length > 0)
        if (count < 13)
            throw new Exception("Invalid Excel");

here i used throw new exception...this is my code in BAL ....i want this exception in the front end ....

in the cs page

catch (Exception ex)
i had something like this
here its catching my exception

But i want to be displayed as a message ..
Posted 10-Oct-12 2:24am
Updated 10-Oct-12 3:02am
Wes Aday 10-Oct-12 9:35am
Okay so? Display it as a message then. What is the problem?
Member 8155568 11-Oct-12 4:06am
It was catcging the messg but not showing .I had put a label and displayed finally.anyways thanks
n.podbielski 11-Oct-12 3:20am
Maybe the problem is writing message to Console in ASP.NET application?
Should you use Page.Response.WriteLine? Or I am missing something?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 10 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100