Click here to Skip to main content
15,914,820 members
Home / Discussions / C#
   

C#

 
GeneralRe: Create File Format Pin
kenexcelon15-Dec-05 12:45
kenexcelon15-Dec-05 12:45 
QuestionASPX using C# : Exception Details: System.Web.HttpException: A page can have only one server-side Form tag. Pin
jmfekete15-Dec-05 7:42
jmfekete15-Dec-05 7:42 
AnswerRe: ASPX using C# : Exception Details: System.Web.HttpException: A page can have only one server-side Form tag. Pin
enjoycrack15-Dec-05 7:56
enjoycrack15-Dec-05 7:56 
GeneralRe: ASPX using C# : Exception Details: System.Web.HttpException: A page can have only one server-side Form tag. Pin
jmfekete15-Dec-05 8:06
jmfekete15-Dec-05 8:06 
GeneralRe: ASPX using C# : Exception Details: System.Web.HttpException: A page can have only one server-side Form tag. Pin
enjoycrack15-Dec-05 8:09
enjoycrack15-Dec-05 8:09 
GeneralRe: ASPX using C# : Exception Details: System.Web.HttpException: A page can have only one server-side Form tag. Pin
jmfekete15-Dec-05 8:25
jmfekete15-Dec-05 8:25 
QuestionComposite Pattern and Generics Pin
RogerRabbit7815-Dec-05 7:20
RogerRabbit7815-Dec-05 7:20 
QuestionASPX using C# : System.InvalidCastException: Specified cast is not valid Pin
jmfekete15-Dec-05 6:57
jmfekete15-Dec-05 6:57 
When running my aspx page that uses C# programming I receive the following error message:
Server Error in '/test' Application.
--------------------------------------------------------------------------------

Specified cast is not valid.
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.InvalidCastException: Specified cast is not valid.

Source Error:


Line 50: {
Line 51: conn.Open();
Line 52: count = (int)cmd.ExecuteScalar();
Line 53: }
Line 54: finally { conn.Dispose(); }


Source File: c:\inetpub\wwwroot\test\test.aspx.cs Line: 52

Stack Trace:


[InvalidCastException: Specified cast is not valid.]
test.DataGridPage.GetItemCount() in c:\inetpub\wwwroot\test\test.aspx.cs:52
test.DataGridPage.Page_Load(Object Src, EventArgs e) in c:\inetpub\wwwroot\test\test.aspx.cs:35
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()


What can I do so that I won't get this message and can finally see if the data is being loaded into my ASPX page properly? I checked on Microsoft's website to see what it means but it's like reading stereo instructions.
Thanks!

Jane
AnswerRe: ASPX using C# : System.InvalidCastException: Specified cast is not valid Pin
enjoycrack15-Dec-05 7:00
enjoycrack15-Dec-05 7:00 
GeneralRe: ASPX using C# : System.InvalidCastException: Specified cast is not valid Pin
jmfekete15-Dec-05 7:25
jmfekete15-Dec-05 7:25 
GeneralRe: ASPX using C# : System.InvalidCastException: Specified cast is not valid Pin
jmfekete15-Dec-05 7:30
jmfekete15-Dec-05 7:30 
GeneralRe: ASPX using C# : System.InvalidCastException: Specified cast is not valid Pin
enjoycrack15-Dec-05 7:52
enjoycrack15-Dec-05 7:52 
AnswerRe: ASPX using C# : System.InvalidCastException: Specified cast is not valid Pin
chinky singh15-Dec-05 7:22
chinky singh15-Dec-05 7:22 
GeneralRe: ASPX using C# : System.InvalidCastException: Specified cast is not valid Pin
jmfekete15-Dec-05 7:29
jmfekete15-Dec-05 7:29 
QuestionA Static class Serialization problem Pin
HolyGrandFather15-Dec-05 6:45
HolyGrandFather15-Dec-05 6:45 
AnswerRe: A Static class Serialization problem Pin
Guffa15-Dec-05 11:39
Guffa15-Dec-05 11:39 
GeneralRe: A Static class Serialization problem Pin
HolyGrandFather16-Dec-05 8:59
HolyGrandFather16-Dec-05 8:59 
AnswerRe: A Static class Serialization problem Pin
Guffa18-Dec-05 0:48
Guffa18-Dec-05 0:48 
GeneralRe: A Static class Serialization problem Pin
HolyGrandFather18-Dec-05 5:27
HolyGrandFather18-Dec-05 5:27 
AnswerRe: A Static class Serialization problem Pin
Guffa18-Dec-05 22:51
Guffa18-Dec-05 22:51 
GeneralRe: A Static class Serialization problem Pin
HolyGrandFather19-Dec-05 4:50
HolyGrandFather19-Dec-05 4:50 
QuestionBrowser closing event Pin
chinky singh15-Dec-05 5:51
chinky singh15-Dec-05 5:51 
AnswerRe: Browser closing event Pin
albCode15-Dec-05 5:54
albCode15-Dec-05 5:54 
GeneralRe: Browser closing event Pin
chinky singh15-Dec-05 6:12
chinky singh15-Dec-05 6:12 
AnswerRe: Browser closing event Pin
Guffa15-Dec-05 11:54
Guffa15-Dec-05 11:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.