Click here to Skip to main content
15,899,124 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Where does app_offline.htm come from Pin
whatUrunning.com21-Nov-08 3:04
whatUrunning.com21-Nov-08 3:04 
Question[newbie] Form does not retain values when refreshed Pin
jon-8020-Nov-08 9:11
professionaljon-8020-Nov-08 9:11 
AnswerRe: [newbie] Form does not retain values when refreshed Pin
Christian Graus20-Nov-08 9:41
protectorChristian Graus20-Nov-08 9:41 
GeneralRe: [newbie] Form does not retain values when refreshed Pin
jon-8020-Nov-08 10:06
professionaljon-8020-Nov-08 10:06 
AnswerRe: [newbie] Form does not retain values when refreshed Pin
N a v a n e e t h20-Nov-08 16:19
N a v a n e e t h20-Nov-08 16:19 
GeneralRe: [newbie] Form does not retain values when refreshed Pin
jon-8021-Nov-08 4:02
professionaljon-8021-Nov-08 4:02 
AnswerRe: [newbie] Form does not retain values when refreshed Pin
knbinoj5820-Nov-08 18:36
knbinoj5820-Nov-08 18:36 
QuestionRe: [newbie] Form does not retain values when refreshed [modified] Pin
jon-8021-Nov-08 0:11
professionaljon-8021-Nov-08 0:11 
I've tried rebuilding from scratch, and scouted the web unsuccessfully trying to find a solution. In my code I had updated the attributes so that they are converted to server controls, hence, processed by the server.

In the previous version, I was viewing the page successfully; within the source tag, I'm seeing the _VIEWSTATE, hence, assuming that view state is already enabled. Am I doing something wrong?

I've noted that:
1. the control "US" is not recognized by Intellisense (see .cs file below)
2. when I load the webpage an error is displayed; this was not displayed before
Compiler Error Message: CS0115: 'ASP.currencyconvertor_aspx.GetTypeHashCode()': no suitable method found to override

Detailed error below.

Confused | :confused:

CurrencyConvertor.aspx
<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CurrencyConvertor.aspx.cs" Inherits="CurrencyConvertor" %>]]>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title> Currency Converter </title>
</head>

<body>
	<form runat="server">
	<div>
		Convert:  
		<input type="text" id="US" runat="server" />
		  US Dollars to Euros.
		<br /> <br />
		<input type="submit" value="OK" id="Convert" runat="server">
		onserverclick="Convert_ServerClick" />
	</input></div>
	</form>
</body>
</html>


CurrencyConvertor.aspx.cs
public partial class html_CurrencyConvertor : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //decimal USAmount = Decimal.Parse(US....
        //here I'm expecting the id US to be displayed within Intellisense, becauase
        //I've declared it within the .aspx file. 
    }
}

// The following HTML source code from previous version

http://www.w3.org/TR/xhml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Currency Converter </title>
</head>

<body>
	<form name="ctl00" method="post" action="CurrencyConvertor.aspx" id="ctl00">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTIwNzEwODIyNjRkZOU+qoUq5TPc2l1GqV4vK0WqaqKv" />

</div>

	<div>
		Convert:  
		<input type="text" id="USD" />
		  US Dollars to Euros.
		<br /> <br />
		<input type="submit" id="Convert" value="OK" onserverclick="Convert_ServerClick" />
		
		<div id="result" style="font-weight: bold"></div> 
	</div>

	</form>
</body>
</html>



Error:
Server Error in '/CurrencyConvertor' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0115: 'ASP.currencyconvertor_aspx.GetTypeHashCode()': no suitable method found to override

Source Error:

Line 329:
Line 330: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 331: public override int GetTypeHashCode() {
Line 332: return -866219369;
Line 333: }

Compilation errors:
Error 1 'ASP.currencyconvertor_aspx.GetTypeHashCode()': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\currencyconvertor\3d4aaba4\f5fe1813\App_Web_gcor8gmu.1.cs 331

Error 2 'ASP.currencyconvertor_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\currencyconvertor\3d4aaba4\f5fe1813\App_Web_gcor8gmu.1.cs 336

Error 3 'ASP.currencyconvertor_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\currencyconvertor\3d4aaba4\f5fe1813\App_Web_gcor8gmu.1.cs 136

Attempted resolution:
Tried deleting files from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\currencyconvertor\.
This required a restart because the files were locked.


Reference:
Beginning ASP.NET in C# 2008 - From Novice to Professional (2nd Edition)

Jon

modified on Friday, November 21, 2008 8:39 AM

AnswerRe: [newbie] Form does not retain values when refreshed Pin
Nishant Singh21-Nov-08 4:00
Nishant Singh21-Nov-08 4:00 
Questionhow to carry a value from a datagrid to a new table Pin
cheryl637220-Nov-08 9:06
cheryl637220-Nov-08 9:06 
AnswerRe: how to carry a value from a datagrid to a new table Pin
Christian Graus20-Nov-08 9:42
protectorChristian Graus20-Nov-08 9:42 
GeneralRe: how to carry a value from a datagrid to a new table Pin
cheryl637220-Nov-08 10:01
cheryl637220-Nov-08 10:01 
GeneralRe: how to carry a value from a datagrid to a new table Pin
Christian Graus20-Nov-08 11:05
protectorChristian Graus20-Nov-08 11:05 
GeneralRe: how to carry a value from a datagrid to a new table Pin
cheryl637221-Nov-08 8:15
cheryl637221-Nov-08 8:15 
QuestionSecurity Scan Pin
hercule5420-Nov-08 9:04
hercule5420-Nov-08 9:04 
AnswerRe: Security Scan Pin
Christian Graus20-Nov-08 9:43
protectorChristian Graus20-Nov-08 9:43 
AnswerRe: Security Scan Pin
N a v a n e e t h20-Nov-08 16:10
N a v a n e e t h20-Nov-08 16:10 
GeneralRe: Security Scan Pin
hercule5420-Nov-08 16:19
hercule5420-Nov-08 16:19 
QuestionMultiline Textbox Maxlength Regular Expression Pin
Ponna Rani20-Nov-08 8:24
Ponna Rani20-Nov-08 8:24 
QuestionActiveX Print Dialog isn't loading Pin
Richard Jones20-Nov-08 7:12
Richard Jones20-Nov-08 7:12 
QuestionLoad Page controls again by writing code in server side in asp.net 2.0 for specific condition Pin
trilokharry20-Nov-08 5:19
trilokharry20-Nov-08 5:19 
AnswerRe: Load Page controls again by writing code in server side in asp.net 2.0 for specific condition Pin
Christian Graus20-Nov-08 8:39
protectorChristian Graus20-Nov-08 8:39 
QuestionProblem updating web reference in Visual Studio 2005 Pin
Cyrilix20-Nov-08 4:44
Cyrilix20-Nov-08 4:44 
AnswerRe: Problem updating web reference in Visual Studio 2005 Pin
Paul Conrad20-Nov-08 5:40
professionalPaul Conrad20-Nov-08 5:40 
GeneralRe: Problem updating web reference in Visual Studio 2005 Pin
Cyrilix20-Nov-08 5:46
Cyrilix20-Nov-08 5:46 

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.