Friday, July 09, 2004 - Posts

Please Submit when i press enter button :D

Hey all,

Got the following way from one of the old(er) blogs around here but forgot witch.
So here we go i have a Button i want to submit when someone presses Enter :D
This is the way to do it add the following code to your code behind:

Page.RegisterHiddenField("__EVENTTARGET", "The_Name_Of_The_Button");

Just replace The_Name_Of_The_Button with the name of the button :P

Edit:
One of the things also possible is that if your in a textbox and you want that someone presses enter and it will submit you can use:

TextBox1.Attributes.Add("OnKeyUp","if(event.keyCode==13) window.location.href='/gotoUrl.aspx'");

Happy netting,
Warnar

Server Error in '/' Application. Parser Error (Don't you love this :p)

Hey all,

I got a small job from www.proctrl.nl for one of there sites.
When in plementing the ASP.NET app i got the following error:

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

Parser Error Message: Could not load type 'ExcelPriceList.price'.

Source Error:

Line 1:  <%@ Page language="c#" Codebehind="price.aspx.cs" AutoEventWireup="false" Inherits="ExcelPriceList.price" %>
Line 2:  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Line 3:  <HTML>

Source File: d:\internet\root\www\burgerhout\www\prijzen\price.aspx    Line: 1

Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

The way to make sure not to get this error is make the dir your putting the app in a virtual one :D

Happy netting,
Warnar