|
AFAIK, this file will not get added automatically.
|
|
|
|
|
It suddenly appeared in a few applications which I knew I did not add manually. I do not even know where the original file is saved. I think it comes from either Framework or Visual studio installation.
TOMZ_KV
|
|
|
|
|
It is generated when you are Publishing a website, it is usually deleted after the Publish has completed.
|
|
|
|
|
Why doesn't this form retain the values when I key them in the textbox? I've tried with Mozilla and IE.
CurrencyConvertor.aspx
<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CurrencyConvertor.aspx.cs" Inherits="CurrencyConvertor" %>]]>
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 runat="server" method="post">
<div>
Convert:
<input type="text" id="USD" />
US Dollars to Euros.
<br /> <br />
<input type="submit" id="Convert" value="OK" />
</div>
</form>
</body>
</html><pre>
<div class="ForumSig">Jon</div>
|
|
|
|
|
This is the ASP.NET forum. You've posted HTML. HTML is client side only, there is no mechanism there for saving state. I suggest you buy a book on ASP.NET and work through it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks, that's just what I was doing.
Jon
|
|
|
|
|
You aren't using any server controls. ASP.NET use a mechanism called ViewState to maintain the values of a page. Try converting the input types to runat=server or change it to ASP.NET server control.
|
|
|
|
|
The runat="server" are already in my code. It's noted that my previous post doesn't appear here, did I do something wrong?
Jon
|
|
|
|
|
Use aspx controls and enable viewstate...
|
|
|
|
|
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.
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
|
|
|
|
|
try runat="server" for ur form controls
|
|
|
|
|
Hello, I'm new to asp.net 2.0.. I know VB but not C#.. I want a user to be able to type their last name in a text box and have their info show in a datagrid, then when they select thier record I want their Customer ID to update the Service Quote table.. Basically the user is just finding their info and starting a new service quote( which is another SQL table).. How do you use a datagrid to update a SQL table in ASP.net 2.0?
Thanks!
|
|
|
|
|
If you allow the grid to support adding a row, you handle the event when the row is added, and then you write SQL to insert it into your DB.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I don't understand.. I'm sorry I'm new at all this.. I know how to update Sql using a datagrid but I want the selected customer ID to carry over to another page and then get inserted into a new datagrid that once completed will then get updated.. I guess i did not phrase my question correct..I understand the update table part just not how to reference the PK in the first datagrid and then carry the PK to another page and another datagrid...Does this make sense? Should I be doing this an entirely different way?
Thanks!
Cheryl
|
|
|
|
|
Oh, OK. Well, that's a new question....
The way to pass an id to a new page, is to put it on the querystring, so your link would be someting like mynewpage.aspx?id=27. They use Request.QueryString["id"] ( assuming this is C#, otherwise use () instead of [], b/c VB sucks ), to access the value ( it will be a string, use int.tryparse to get the number out ).
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Sorry, I still don't understand..Maybe I should just run a SQL insert query when a customer selects their name from the grid.. The problem is, I dont know how to reference the value in the grid... The value I want to reference is the key value( CustID)I want to insert this value into another table called servicequote..I thought the best way to do that would be to carry the CustID from the customer datagrid(based off the customer table) to another datagrid( based on the servicequote table) I guess that is not a good way??? So maybe I should just run an insert sql query when someone selects their name from the customer datagrid that inserts into the serice quotetable.. HOw do I do this? I need very very basic instructions like....in the HTML code type this and in the VB code type this...
Please help..
Thanks,
Cheryl
|
|
|
|
|
I can't find any resources about performing SQL injection or cross site vulnerability scans. I'm not sure if there are ASP.NET tools for this.
Is there a way to code a solution for this? I'm trying to provide a security solution.
Thanks
|
|
|
|
|
I'm not sure I follow. How does ASP.NET relate to the security of your DB code ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hercule54 wrote: I can't find any resources about performing SQL injection or cross site vulnerability scans. I'm not sure if there are ASP.NET tools for this.
Are you sure that you know what is SQL Injection and Cross site scripting? If yes, you can understand that there won't be any tools to find that. Here[^] is an article which takes SQL Injection in detail.
|
|
|
|
|
I've gone over the link you've posted. Since there are existing 3rd party & online applications that can scan sites, I thought there was a way either in ASP.NET or maybe another language to get the same results.
Thanks
|
|
|
|
|
I have a requirement to set maxlength for Textbox with multiline textmode. The property MaxLength is
not working when the textmode is multiline since it is rendered as textarea. There are couple of ways
explained in forums. I would prefer regular expression than Javascript.
A Regular expression that seems to be working does not work if the page uses master page. It
does not accept carriage return or newline or leading and trailing blanks and throws up error.
^[\s\S]{0,20}$
Have you come across such scenario before? If so, please help.
Thanks
|
|
|
|
|
I have a dev IIS server which displays the Printer dialog when I click the printer icon in a crystal report.
When I click the same icon on the production server, "failed to load page" message appears in a box the size of the printer dialog, no dialog.
I can't find help on this anywhere. Can anyone help?
Cheetah. Ferret. Gonads. What more can I say? - Pete O'Hanlon
|
|
|
|
|
Hi
I am deleting some DataTable records by using ajax and I am showing these DataTable records through Html table in .aspx page using InLine code.
suppose I have 3 rows and deleted 1 row then It should be shown 2 rows only in UI part but It is showing still 3 rows and when I refresh page by using F5 Key in keyboard then It's showing 2 rows that is I want.
but I dont want to show deleted row after deleting.
so how can I refresh page or load page controls again by writing code in .cs file.
because of using ajax It is not refreshing the page.
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
You need to delete the row using javascript, if you're writing your own AJAX. If you're using ASP.NET AJAX, you should be able to make the grid refresh using AJAX.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yesterday, I started creating my web service, and essentially, I have a few projects:
-web service project
-application that calls web service web methods
-common class library
From the application, I added a web reference to the web service in the web service project. Today, when I try to update it by right clicking on the web reference, and then going to "Update Web Reference", I get the following error:
"There was an error downloading 'http://localhost:2276/NewWebService.asmx'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:2276
I'm not too sure why it was working fine yesterday but not now. Is there something that I need to restart, perhaps?
Thanks.
|
|
|
|