472,991 Members | 2,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,991 software developers and data experts.

Framwork 1.1->2.0: PostBack error when client script is applied

Hello

I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0
I am at the end of debugging and fixing stuff. Now there is one error I just
cannot find a solution to:

On some pages I have applied a small client-script to trap the enter-key
beeing pressed and re-route this action. With the new version this little
script still works, it traps the enter-key. BUT it causes postback-errors on
many other .NET control, dropdown lists, checkboxes. Tthe postback from
these controls generates a browser error, claiming error with this (Line: 1,
Char 2, Error: Invalid charcter, Code 0)

First of all; What line no 1 is the line in question? Is it the code file in
VS? No. Is it the html-file in VS? No. My best guess have been to click
"view source" to sse what this page actually looks like from the browser
point of view. The first line is a blank line, the second starts with
"<!DOCTYPE HTML PUBLIC....." and I even tried to remove the "!" - in
addition to many other more or less blind try and failure. When I disable
the client script, the postback is ok again. Had it not been for the script
actually working I would surely suspected the script itself.

The strange thing is that this worked well in the previous version (VS
2003), no change of code when the upgrade to VS 2005 was done. I suppose I
need to add some code lines somewhere, but I am getting exhausted by trying
all thinkable combination.

(I must add, I am not an expert at all, so maybe the obvious is staring wild
and hard at me, laughing and grinning at its best)

Regards
Bjorn
Dec 29 '06 #1
5 1964
Hi Bjorn,

Let me (briefly) explain how it works:

Aspx pages generate html code (including your javascript) which is sent to
browser (you can see generated html document selecting 'view source' in any
browser). Error you're seeing is definitely caused by javascript you created
to detect enter key has been pressed. As you may know, after document is
retrived, browser parses its content and builds DOM objects in order to
provide dynamic functionality (i.e. message/prompt/confirmation box, dynamic
text, etc.). Usually all scripts are concatenated to one (simplifiyng
shortcut:), therefore line numbers represent lines in parsed, concatenated
script. But don't worry, it's easy to debug client scripts in IE and VS2005,
what you have to do is:
1. IE->Tools->Internet Options, select advanced tab, untick 'Disable Client
Script Debuging (Internet Explorer).
2. Close all IE windows.
3. Run asp.net application in debug mode and go to page that causes the
error,
4. In VS2005, go to Debug->Window->Script Expolorer
5. You should see list of all running documents
6. Double click on the page that causes the error (on the list of course)
7. put a breakpoint at the first line of your script
8. You're done, you are able to debug your script.

If it doesn't help, show us the script so we could provide a solution.

Hope this helps

"Error Line: 1, Char 2, Error: Invalid charcter, Code 0"
--
Milosz Skalecki
MCAD
"Bjorn Sagbakken" wrote:
Hello

I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0
I am at the end of debugging and fixing stuff. Now there is one error I just
cannot find a solution to:

On some pages I have applied a small client-script to trap the enter-key
beeing pressed and re-route this action. With the new version this little
script still works, it traps the enter-key. BUT it causes postback-errors on
many other .NET control, dropdown lists, checkboxes. Tthe postback from
these controls generates a browser error, claiming error with this (Line: 1,
Char 2, Error: Invalid charcter, Code 0)

First of all; What line no 1 is the line in question? Is it the code file in
VS? No. Is it the html-file in VS? No. My best guess have been to click
"view source" to sse what this page actually looks like from the browser
point of view. The first line is a blank line, the second starts with
"<!DOCTYPE HTML PUBLIC....." and I even tried to remove the "!" - in
addition to many other more or less blind try and failure. When I disable
the client script, the postback is ok again. Had it not been for the script
actually working I would surely suspected the script itself.

The strange thing is that this worked well in the previous version (VS
2003), no change of code when the upgrade to VS 2005 was done. I suppose I
need to add some code lines somewhere, but I am getting exhausted by trying
all thinkable combination.

(I must add, I am not an expert at all, so maybe the obvious is staring wild
and hard at me, laughing and grinning at its best)

Regards
Bjorn
Dec 29 '06 #2
Thanks Milosz,

That was a great tip!
Now, one thing I forgot to say is that I used VBScript for the client
scripting. Because I'm only familiar with VB, and because this
web-application is only used in my companys intranet, I wanted a quick
solution. Well, now I understand that each page only can have one
script-language at the time, so my suspision goes to a mix of vbscript and
javascript.

Anyhow, I have taken the first step in writing my first javascript, since
this obviously is a general good idea. After some back and forth I'm
actually very close to obtain my target. The errors are gone, and I have
manged to trap the enter-key. Next, I want to code-wise click a button (that
is; to perform the click-method for this button)

The troubled code-line looks like this:

document.getElementById("cmdSearch").click

There is no error on this, a postback happens, but the desired search is not
executed.
I have no idea why. If I use the mouse and click on the "cmdSearch"-button
the search is ok.
Any idea? Is the code correct for "clicking the search-button from a
script"? I have tried with "()" and ";" at the end, but this causes an
error.

Bjorn

"Milosz Skalecki" <mi*****@REMOVEITwp.plwrote in message
news:DD**********************************@microsof t.com...
Hi Bjorn,

Let me (briefly) explain how it works:

Aspx pages generate html code (including your javascript) which is sent to
browser (you can see generated html document selecting 'view source' in
any
browser). Error you're seeing is definitely caused by javascript you
created
to detect enter key has been pressed. As you may know, after document is
retrived, browser parses its content and builds DOM objects in order to
provide dynamic functionality (i.e. message/prompt/confirmation box,
dynamic
text, etc.). Usually all scripts are concatenated to one (simplifiyng
shortcut:), therefore line numbers represent lines in parsed, concatenated
script. But don't worry, it's easy to debug client scripts in IE and
VS2005,
what you have to do is:
1. IE->Tools->Internet Options, select advanced tab, untick 'Disable
Client
Script Debuging (Internet Explorer).
2. Close all IE windows.
3. Run asp.net application in debug mode and go to page that causes the
error,
4. In VS2005, go to Debug->Window->Script Expolorer
5. You should see list of all running documents
6. Double click on the page that causes the error (on the list of course)
7. put a breakpoint at the first line of your script
8. You're done, you are able to debug your script.

If it doesn't help, show us the script so we could provide a solution.

Hope this helps

"Error Line: 1, Char 2, Error: Invalid charcter, Code 0"
--
Milosz Skalecki
MCAD
"Bjorn Sagbakken" wrote:
>Hello

I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to
2.0
I am at the end of debugging and fixing stuff. Now there is one error I
just
cannot find a solution to:

On some pages I have applied a small client-script to trap the enter-key
beeing pressed and re-route this action. With the new version this little
script still works, it traps the enter-key. BUT it causes postback-errors
on
many other .NET control, dropdown lists, checkboxes. Tthe postback from
these controls generates a browser error, claiming error with this (Line:
1,
Char 2, Error: Invalid charcter, Code 0)

First of all; What line no 1 is the line in question? Is it the code file
in
VS? No. Is it the html-file in VS? No. My best guess have been to click
"view source" to sse what this page actually looks like from the browser
point of view. The first line is a blank line, the second starts with
"<!DOCTYPE HTML PUBLIC....." and I even tried to remove the "!" - in
addition to many other more or less blind try and failure. When I disable
the client script, the postback is ok again. Had it not been for the
script
actually working I would surely suspected the script itself.

The strange thing is that this worked well in the previous version (VS
2003), no change of code when the upgrade to VS 2005 was done. I suppose
I
need to add some code lines somewhere, but I am getting exhausted by
trying
all thinkable combination.

(I must add, I am not an expert at all, so maybe the obvious is staring
wild
and hard at me, laughing and grinning at its best)

Regards
Bjorn

Dec 29 '06 #3
Howdy Bjorn

Paste entire code for the aspx page.

Regards
--
Milosz Skalecki
MCAD
"Bjorn Sagbakken" wrote:
Thanks Milosz,

That was a great tip!
Now, one thing I forgot to say is that I used VBScript for the client
scripting. Because I'm only familiar with VB, and because this
web-application is only used in my companys intranet, I wanted a quick
solution. Well, now I understand that each page only can have one
script-language at the time, so my suspision goes to a mix of vbscript and
javascript.

Anyhow, I have taken the first step in writing my first javascript, since
this obviously is a general good idea. After some back and forth I'm
actually very close to obtain my target. The errors are gone, and I have
manged to trap the enter-key. Next, I want to code-wise click a button (that
is; to perform the click-method for this button)

The troubled code-line looks like this:

document.getElementById("cmdSearch").click

There is no error on this, a postback happens, but the desired search is not
executed.
I have no idea why. If I use the mouse and click on the "cmdSearch"-button
the search is ok.
Any idea? Is the code correct for "clicking the search-button from a
script"? I have tried with "()" and ";" at the end, but this causes an
error.

Bjorn

"Milosz Skalecki" <mi*****@REMOVEITwp.plwrote in message
news:DD**********************************@microsof t.com...
Hi Bjorn,

Let me (briefly) explain how it works:

Aspx pages generate html code (including your javascript) which is sent to
browser (you can see generated html document selecting 'view source' in
any
browser). Error you're seeing is definitely caused by javascript you
created
to detect enter key has been pressed. As you may know, after document is
retrived, browser parses its content and builds DOM objects in order to
provide dynamic functionality (i.e. message/prompt/confirmation box,
dynamic
text, etc.). Usually all scripts are concatenated to one (simplifiyng
shortcut:), therefore line numbers represent lines in parsed, concatenated
script. But don't worry, it's easy to debug client scripts in IE and
VS2005,
what you have to do is:
1. IE->Tools->Internet Options, select advanced tab, untick 'Disable
Client
Script Debuging (Internet Explorer).
2. Close all IE windows.
3. Run asp.net application in debug mode and go to page that causes the
error,
4. In VS2005, go to Debug->Window->Script Expolorer
5. You should see list of all running documents
6. Double click on the page that causes the error (on the list of course)
7. put a breakpoint at the first line of your script
8. You're done, you are able to debug your script.

If it doesn't help, show us the script so we could provide a solution.

Hope this helps

"Error Line: 1, Char 2, Error: Invalid charcter, Code 0"
--
Milosz Skalecki
MCAD
"Bjorn Sagbakken" wrote:
Hello

I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to
2.0
I am at the end of debugging and fixing stuff. Now there is one error I
just
cannot find a solution to:

On some pages I have applied a small client-script to trap the enter-key
beeing pressed and re-route this action. With the new version this little
script still works, it traps the enter-key. BUT it causes postback-errors
on
many other .NET control, dropdown lists, checkboxes. Tthe postback from
these controls generates a browser error, claiming error with this (Line:
1,
Char 2, Error: Invalid charcter, Code 0)

First of all; What line no 1 is the line in question? Is it the code file
in
VS? No. Is it the html-file in VS? No. My best guess have been to click
"view source" to sse what this page actually looks like from the browser
point of view. The first line is a blank line, the second starts with
"<!DOCTYPE HTML PUBLIC....." and I even tried to remove the "!" - in
addition to many other more or less blind try and failure. When I disable
the client script, the postback is ok again. Had it not been for the
script
actually working I would surely suspected the script itself.

The strange thing is that this worked well in the previous version (VS
2003), no change of code when the upgrade to VS 2005 was done. I suppose
I
need to add some code lines somewhere, but I am getting exhausted by
trying
all thinkable combination.

(I must add, I am not an expert at all, so maybe the obvious is staring
wild
and hard at me, laughing and grinning at its best)

Regards
Bjorn


Jan 1 '07 #4
Howdy Bjorn
>
Paste entire code for the aspx page.

Regards
--
Milosz Skalecki
MCAD
Well, her it is. There is a lot of stuff downwards that does not have
anything with the question at hand.
There are several UserControls involved too, but the scipt including its
references would be the issue here.
I don't know what you can make of it. Maybe I should add another line in
there, I have seen things like "Return=False" or "window.returnvalue false;"
to disable the default behaviour of hitting enter.

Regards
Bjorn

<%@ Reference Control="~/Sikkerhet_SM_Menu.ascx" %>
<%@ Reference Page="~/Sikkerhet_Home.aspx" %>
<%@ Reference Control="~/Sikkerhet_SM_Menu.ascx" %>
<%@ Reference Page="~/Sikkerhet_Home.aspx" %>
<%@ Reference Control="~/Sikkerhet_SM_Menu.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false"
Inherits="SikkerhetWEB.Sikkerhet_SM_Kunder"
CodeFile="Sikkerhet_SM_Kunder.aspx.vb" %>
<%@ Register TagPrefix="Menu" TagName="Menu" src="Sikkerhet_Menu.ascx" %>
<%@ Register TagPrefix="Banner" TagName="Banner" src="Banner.ascx" %>
<%@ Register TagPrefix="SMMenu" TagName="SMMenu"
src="Sikkerhet_SM_Menu.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Sikkerhet_SM_Kunder</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<meta content="text/JScript" http-equiv="content-script-type" />
<script id="id1" language="jscript">
function SearchClient()
{
if (window.event.keyCode == 13)
{
document.getElementById("cmdSearch").click()
}
}
</script>
</HEAD>
<body onkeypress ="SearchClient()">
<form id="frmKunder" method="post" target="_self" runat="server">
<p>
<asp:button id="Button1" style="Z-INDEX: 106; LEFT: 712px; POSITION:
absolute; TOP: 168px"
runat="server" Text="Ny ordre"></asp:button><banner:banner id="Banner1"
runat="server"></banner:banner></p>
<p><menu:menu id="Menu1" runat="server"></menu:menu></p>
<p><smmenu:smmenu id="SMMenu1" runat="server"></smmenu:smmenu></p>
<p><asp:panel id="panelSearchCount" style="Z-INDEX: 103; LEFT: 16px;
POSITION: absolute; TOP: 632px"
runat="server" HorizontalAlign="Left" BorderStyle="Dotted"
BorderWidth="1px" BorderColor="Silver"
BackColor="DarkGoldenrod" Height="16px" Width="136px">
<FONT face="Arial Baltic" size="2"><FONT color="#ffffff">Antall
søk:</FONT>
<asp:label id="lblSearchCount" runat="server" Width="40px"
ForeColor="White">00</asp:label></FONT></asp:panel></P>
<P><asp:panel id="Panel1" style="Z-INDEX: 104; LEFT: 16px; POSITION:
absolute; TOP: 480px" runat="server"
HorizontalAlign="Left" BorderStyle="Dotted" BorderWidth="1px"
BorderColor="Silver" BackColor="Honeydew"
Height="136px" Width="136px">
<FONT face="Arial" size="2">Dette er en kopi av&nbsp;kunderegisteret som
benyttes i
Paradox i ODV. Etterhvert kan det tenkes at vi åpner for at flere legge
inn
sine egne kunder, dersom dette er av interesse.</FONT>
</asp:panel>
<P><asp:panel id="Panel2" style="Z-INDEX: 105; LEFT: 16px; POSITION:
absolute; TOP: 400px" runat="server"
HorizontalAlign="Left" BorderStyle="Dotted" BorderWidth="1px"
BorderColor="Silver" BackColor="Thistle"
Height="29px" Width="136px">
<FONT face="Arial" size="2"><STRONG>Merk: Informasjonen her er ikke
nødvendigvis
oppdatert</STRONG></FONT></asp:panel></P>
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 184px; WIDTH: 472px;
POSITION: absolute; TOP: 168px; HEIGHT: 29px"
borderColor="silver" cellSpacing="0" cellPadding="0" border="1">
<TR>
<TD style="WIDTH: 54px"><asp:button id="cmdTilbake" runat="server"
Height="22px" Width="72px" Enabled="False"
Text="<-Tilbake"></asp:button></TD>
<TD style="width: 872px"><asp:textbox id="txtSearch" runat="server"
Width="144px"></asp:textbox><asp:button id="cmdSearch" runat="server"
Text="Søk" ValidationGroup="txtSearch"></asp:button>&nbsp;
</TD>
</TR>
</TABLE>
<DIV style="Z-INDEX: 102; LEFT: 184px; WIDTH: 87.57%; POSITION: absolute;
TOP: 200px; HEIGHT: 669px"><asp:panel id="panelSearch" runat="server"
Height="128px" Width="80%">
<asp:repeater id="rpKunder" runat="server" EnableViewState="True">
<ItemTemplate>
<tr bgcolor="Beige">
<td align="center">
<%# Databinder.Eval(Container.DataItem, "Knr") %>
</td>
<td align="left">
<asp:LinkButton Runat =server OnClick ="VisKunde" CommandArgument
='<%# Databinder.Eval(Container.DataItem, "Knr") %>'>
<%# Databinder.Eval(Container.DataItem, "Navn") %>
</asp:LinkButton>
</td>
<td align="Left">
<%# Databinder.Eval(Container.DataItem, "Adresse") %>
</td>
<td align="left">
<%# Databinder.Eval(Container.DataItem, "Sted") %>
</td>
<td align="left">
<%# Databinder.Eval(Container.DataItem, "Tlf") %>
</td>
<td>
<%# Databinder.Eval(Container.DataItem, "Lev") %>
</td>
</tr>
</ItemTemplate>
<HeaderTemplate>
<table border="0" style="FONT-SIZE: 14px; FONT-FAMILY: Arial"
cellpadding="0" cellspacing="2"
width="100%">
<tr bgcolor="#939598" width="100%">
<td><FONT face="Arial" color="#ffffff">Knr</td>
<td><FONT face="Arial" color="#ffffff">Kunde</td>
<td><FONT face="Arial" color="#ffffff">Gateadresse</td>
<td><FONT face="Arial" color="#ffffff">Sted</td>
<td><FONT face="Arial" color="#ffffff">Tlf</td>
<td><FONT face="Arial" color="#ffffff">L</td>
</tr>
</HeaderTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:repeater>
<asp:Panel ID="Panel3" runat="server" Height="32px"
Width="100%" HorizontalAlign="Left">
</asp:Panel>
</asp:panel><asp:panel id="panelKunde" runat="server"
BackColor="Transparent" Height="353" Width="806px"
Visible="False">
<DIV style="WIDTH: 112.64%; FONT-FAMILY: Arial; POSITION: relative;
HEIGHT: 514px">
<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 0px; POSITION:
absolute; TOP: 56px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" BorderStyle="Solid"
Font-Size="Smaller">Navn</asp:Label>
<asp:Label id="lblNavn" style="Z-INDEX: 102; LEFT: 88px; POSITION:
absolute; TOP: 56px" runat="server"
Width="216px" Height="42px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="Label2" style="Z-INDEX: 103; LEFT: 320px; POSITION:
absolute; TOP: 80px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Gateadresse</asp:Label>
<asp:Label id="lblGateadresse" style="Z-INDEX: 104; LEFT: 408px;
POSITION: absolute; TOP: 80px"
runat="server" Width="216px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="Label3" style="Z-INDEX: 105; LEFT: 320px; POSITION:
absolute; TOP: 128px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Sted</asp:Label>
<asp:Label id="lblGateAdresse2" style="Z-INDEX: 106; LEFT: 408px;
POSITION: absolute; TOP: 80px"
runat="server" Width="216px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblPostNr" style="Z-INDEX: 107; LEFT: 408px; POSITION:
absolute; TOP: 128px"
runat="server" Width="48px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblSted" style="Z-INDEX: 108; LEFT: 472px; POSITION:
absolute; TOP: 128px" runat="server"
Width="152px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="Label4" style="Z-INDEX: 109; LEFT: 320px; POSITION:
absolute; TOP: 152px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Land</asp:Label>
<asp:Label id="lblLand" style="Z-INDEX: 110; LEFT: 408px; POSITION:
absolute; TOP: 152px" runat="server"
Width="216px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblKundeOverskrift" style="Z-INDEX: 111; LEFT: 0px;
POSITION: absolute; TOP: 8px"
runat="server" Width="806px" BackColor="#939598" BorderColor="Silver"
BorderWidth="1px"
BorderStyle="None" ForeColor="White" Font-Size="Smaller"
Font-Bold="True">Kundedata</asp:Label>
<asp:Label id="Label6" style="Z-INDEX: 112; LEFT: 0px; POSITION:
absolute; TOP: 128px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" BorderStyle="Solid"
Font-Size="Smaller">Tlf</asp:Label>
<asp:Label id="Label7" style="Z-INDEX: 113; LEFT: 0px; POSITION:
absolute; TOP: 152px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" BorderStyle="Solid"
Font-Size="Smaller">Fax</asp:Label>
<asp:Label id="Label8" style="Z-INDEX: 114; LEFT: 0px; POSITION:
absolute; TOP: 176px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" BorderStyle="Solid"
Font-Size="Smaller">Mail</asp:Label>
<asp:Label id="Label9" style="Z-INDEX: 115; LEFT: 0px; POSITION:
absolute; TOP: 200px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" BorderStyle="Solid"
Font-Size="Smaller">Hjemmeside</asp:Label>
<asp:Label id="Label10" style="Z-INDEX: 116; LEFT: 0px; POSITION:
absolute; TOP: 224px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" BorderStyle="Solid"
Font-Size="Smaller">Notat</asp:Label>
<asp:Label id="Label11" style="Z-INDEX: 117; LEFT: 320px; POSITION:
absolute; TOP: 56px" runat="server"
Width="304px" BackColor="#E0E0E0" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller">Gateadresse
(leveringsadresse)</asp:Label>
<asp:Label id="Label12" style="Z-INDEX: 118; LEFT: 0px; POSITION:
absolute; TOP: 104px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" BorderStyle="Solid"
Font-Size="Smaller">Bransje</asp:Label>
<asp:Label id="Label13" style="Z-INDEX: 119; LEFT: 320px; POSITION:
absolute; TOP: 176px" runat="server"
Width="302px" BackColor="#E0E0E0" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller">Fakturaadresse
(postboksadresse)</asp:Label>
<asp:Label id="Label14" style="Z-INDEX: 120; LEFT: 320px; POSITION:
absolute; TOP: 200px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Postboks</asp:Label>
<asp:Label id="Label16" style="Z-INDEX: 121; LEFT: 640px; POSITION:
absolute; TOP: 56px" runat="server"
Width="166px" BackColor="#E0E0E0" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller">Administrativ informasjon</asp:Label>
<asp:Label id="Label17" style="Z-INDEX: 122; LEFT: 640px; POSITION:
absolute; TOP: 80px" runat="server"
Width="88px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Kundenr</asp:Label>
<asp:Label id="Label18" style="Z-INDEX: 123; LEFT: 640px; POSITION:
absolute; TOP: 104px" runat="server"
Width="88px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Kundenr PAM</asp:Label>
<asp:Label id="Label19" style="Z-INDEX: 124; LEFT: 320px; POSITION:
absolute; TOP: 224px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Sted</asp:Label>
<asp:Label id="Label22" style="Z-INDEX: 125; LEFT: 320px; POSITION:
absolute; TOP: 248px" runat="server"
Width="302px" BackColor="#E0E0E0" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller">Besøksadresse</asp:Label>
<asp:Label id="Label15" style="Z-INDEX: 126; LEFT: 320px; POSITION:
absolute; TOP: 272px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Gateadresse</asp:Label>
<asp:Label id="Label23" style="Z-INDEX: 127; LEFT: 320px; POSITION:
absolute; TOP: 296px" runat="server"
Width="80px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Sted</asp:Label>
<asp:Label id="Label20" style="Z-INDEX: 128; LEFT: 0px; POSITION:
absolute; TOP: 328px" runat="server"
Width="800px" BackColor="#E0E0E0" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller">Kontaktpersoner</asp:Label>
<asp:Label id="lblNotat" style="Z-INDEX: 129; LEFT: 88px; POSITION:
absolute; TOP: 224px" runat="server"
Width="216px" Height="78px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblTlf1" style="Z-INDEX: 130; LEFT: 88px; POSITION:
absolute; TOP: 128px" runat="server"
Width="104px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblTlf2" style="Z-INDEX: 131; LEFT: 200px; POSITION:
absolute; TOP: 128px" runat="server"
Width="104px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblFax1" style="Z-INDEX: 132; LEFT: 88px; POSITION:
absolute; TOP: 152px" runat="server"
Width="104px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblFax2" style="Z-INDEX: 133; LEFT: 200px; POSITION:
absolute; TOP: 152px" runat="server"
Width="104px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblBransje" style="Z-INDEX: 134; LEFT: 88px; POSITION:
absolute; TOP: 104px"
runat="server" Width="216px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblMail" style="Z-INDEX: 135; LEFT: 88px; POSITION:
absolute; TOP: 176px" runat="server"
Width="216px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:HyperLink id="hlHjemmeside" style="Z-INDEX: 136; LEFT: 88px;
POSITION: absolute; TOP: 200px"
runat="server" Width="208px" Enabled="False" Font-Size="Smaller"
NavigateUrl="" Target="_blank"></asp:HyperLink>
<asp:Label id="lblKnr" style="Z-INDEX: 137; LEFT: 736px; POSITION:
absolute; TOP: 80px" runat="server"
Width="70px" BackColor="White" BorderColor="Silver" BorderWidth="1px"
Font-Size="Smaller"></asp:Label>
<asp:Label id="lblPAM" style="Z-INDEX: 138; LEFT: 736px; POSITION:
absolute; TOP: 104px" runat="server"
Width="70px" BackColor="White" BorderColor="Silver" BorderWidth="1px"
Font-Size="Smaller"></asp:Label>
<asp:Label id="lblKnrX" style="Z-INDEX: 139; LEFT: 640px; POSITION:
absolute; TOP: 296px" runat="server"
Width="166px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="Label21" style="Z-INDEX: 140; LEFT: 640px; POSITION:
absolute; TOP: 272px" runat="server"
Width="166px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Vårt kundnr hos
leverandør</asp:Label>
<asp:Label id="Label24" style="Z-INDEX: 141; LEFT: 640px; POSITION:
absolute; TOP: 128px" runat="server"
Width="88px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Leverandør</asp:Label>
<asp:Label id="Label25" style="Z-INDEX: 142; LEFT: 640px; POSITION:
absolute; TOP: 152px" runat="server"
Width="88px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Forhandler</asp:Label>
<asp:Label id="Label26" style="Z-INDEX: 143; LEFT: 640px; POSITION:
absolute; TOP: 176px" runat="server"
Width="88px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Fastpriskunde</asp:Label>
<asp:Label id="lblLev" style="Z-INDEX: 144; LEFT: 736px; POSITION:
absolute; TOP: 128px" runat="server"
Width="70px" BackColor="White" BorderColor="Silver" BorderWidth="1px"
Font-Size="Smaller"></asp:Label>
<asp:Label id="Label27" style="Z-INDEX: 145; LEFT: 640px; POSITION:
absolute; TOP: 200px" runat="server"
Width="88px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Lev. bet.</asp:Label>
<asp:Label id="lblLevBet" style="Z-INDEX: 146; LEFT: 736px; POSITION:
absolute; TOP: 200px"
runat="server" Width="70px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblForh" style="Z-INDEX: 147; LEFT: 736px; POSITION:
absolute; TOP: 152px" runat="server"
Width="70px" BackColor="White" BorderColor="Silver" BorderWidth="1px"
Font-Size="Smaller"></asp:Label>
<asp:Label id="lblFP" style="Z-INDEX: 148; LEFT: 736px; POSITION:
absolute; TOP: 176px" runat="server"
Width="70px" BackColor="White" BorderColor="Silver" BorderWidth="1px"
Font-Size="Smaller"></asp:Label>
<asp:Label id="lblPostboks" style="Z-INDEX: 149; LEFT: 408px;
POSITION: absolute; TOP: 200px"
runat="server" Width="216px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblnrPB" style="Z-INDEX: 150; LEFT: 408px; POSITION:
absolute; TOP: 224px" runat="server"
Width="56px" BackColor="White" BorderColor="Silver" BorderWidth="1px"
Font-Size="Smaller"></asp:Label>
<asp:Label id="lblStedPB" style="Z-INDEX: 151; LEFT: 472px; POSITION:
absolute; TOP: 224px"
runat="server" Width="152px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblGateadresseB" style="Z-INDEX: 152; LEFT: 408px;
POSITION: absolute; TOP: 272px"
runat="server" Width="216px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblStedB" style="Z-INDEX: 153; LEFT: 472px; POSITION:
absolute; TOP: 296px"
runat="server" Width="152px" BackColor="White" BorderColor="Silver"
BorderWidth="1px" Font-Size="Smaller"></asp:Label>
<asp:Label id="lblNrB" style="Z-INDEX: 154; LEFT: 408px; POSITION:
absolute; TOP: 296px" runat="server"
Width="56px" BackColor="White" BorderColor="Silver" BorderWidth="1px"
Font-Size="Smaller"></asp:Label>
<asp:Label id="Label28" style="Z-INDEX: 155; LEFT: 640px; POSITION:
absolute; TOP: 224px" runat="server"
Width="88px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Sist endret</asp:Label>
<asp:Label id="lblSED" style="Z-INDEX: 156; LEFT: 736px; POSITION:
absolute; TOP: 224px" runat="server"
Width="70px" BackColor="White" BorderColor="Silver" BorderWidth="1px"
Font-Size="Smaller"></asp:Label>
<asp:Label id="Label29" style="Z-INDEX: 157; LEFT: 640px; POSITION:
absolute; TOP: 248px" runat="server"
Width="88px" BackColor="WhiteSmoke" BorderColor="WhiteSmoke"
BorderWidth="1px" Font-Size="Smaller">Endret av</asp:Label>
<asp:Label id="lblEAV" style="Z-INDEX: 158; LEFT: 736px; POSITION:
absolute; TOP: 248px" runat="server"
Width="70px" BackColor="White" BorderColor="Silver" BorderWidth="1px"
Font-Size="Smaller"></asp:Label>
<asp:Panel id="panelKontakter" style="Z-INDEX: 159; LEFT: 0px;
POSITION: absolute; TOP: 352px"
runat="server" Width="80%" Height="152px">
<asp:repeater id="rpKontakter" runat="server" EnableViewState="True">
<ItemTemplate>
<tr bgcolor="WhiteSmoke">
<td align="Left">
<%# Databinder.Eval(Container.DataItem, "Navn") %>
</td>
<td align="Left">
<%# Databinder.Eval(Container.DataItem, "Tittel") %>
</td>
<td align="left">
<%# Databinder.Eval(Container.DataItem, "Tlf") %>
</td>
<td align="left">
<%# Databinder.Eval(Container.DataItem, "Mobil") %>
</td>
<td>
<%# Databinder.Eval(Container.DataItem, "Email") %>
</td>
</tr>
</ItemTemplate>
<HeaderTemplate>
<table style="FONT-SIZE: 14px; FONT-FAMILY: Arial" border="0"
cellpadding="0" cellspacing="2"
width="100%">
<tr bgcolor="#939598" width="100%">
<td><FONT face="Arial" color="#ffffff">Navn</td>
<td><FONT face="Arial" color="#ffffff">Tittel</td>
<td><FONT face="Arial" color="#ffffff">Tlf</td>
<td><FONT face="Arial" color="#ffffff">Mobil</td>
<td><FONT face="Arial" color="#ffffff">Mail</td>
</tr>
</HeaderTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:repeater>
</asp:Panel>
<TABLE id="Table2" style="Z-INDEX: 163; LEFT: 0px; WIDTH: 806px;
POSITION: absolute; TOP: 24px; HEIGHT: 2px"
cellSpacing="0" cellPadding="0" width="806" bgColor="whitesmoke"
border="0">
<TR>
<TD>
<asp:LinkButton id="cmdBestill" runat="server" Width="88px"
Height="24px" Font-Size="Smaller"></asp:LinkButton></TD>
<TD>
<asp:LinkButton id="cmdAnlegg" runat="server" Width="88px"
Height="24px" Font-Size="Smaller"></asp:LinkButton></TD>
<TD>
<asp:LinkButton id="cmdOrdre" runat="server" Width="88px"
Height="24px" Font-Size="Smaller"></asp:LinkButton></TD>
<TD>
<asp:LinkButton id="cmdTilbud" runat="server" Width="88px"
Height="24px" Font-Size="Smaller"></asp:LinkButton></TD>
</TR>
</TABLE>
</DIV>
</asp:panel></DIV>
</form>
</body>
</HTML>
Jan 1 '07 #5
I have fixed it!

event.returnvalue=false;
event.cancel = true;
document.getElementById("cmdSearch").click()

It struck me that the enter-key also needed to be inhibited in its default
action.
I found back to some code I had seen before, so now it works!

Regards
Bjorn
Jan 1 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Clark B | last post by:
How can I check which version of .NET framework user is running? Regards Clarkie
0
by: Ambroski | last post by:
I would like to know if I create an application in Application Development Framwork for 10g, will that be compatible with Oracle Db 9i and Oracle's 9i front-end tools? I suppose ADF has more...
2
by: Don Wash | last post by:
Hi All! I'm new to .NET and I've made a few searches on the net and finally found that the key to understand Microsoft .NET development process is to understand Microsoft .NET Framework classes...
2
by: sunrat | last post by:
After installing .NET Framework SP1, I find that re-compiling Visual C++.NET code with Visual Studio 2003 (v 7.1.3088) that previously compiled successfully gives rise to two errors: C2039:...
1
by: al_qwertyuiop | last post by:
Hi, I was wondering what happens if an .net exe compiled with 1.1 uses one dll compiled with 2.0 and one dll compiled with 1.1. Supposing that the target machine has both 1.1 and 2.0. Does the...
5
by: Nathan Wiegman | last post by:
Using the XmlSerializer to deserialize a double.NaN value generates an exception in the framework which the framework then catches. This is super undesirable in our application, because our...
4
by: Mulm3h | last post by:
Hi Is there a way to run a windows application created in VB 2005 express on other computers which have no .NET framwork installed on them? Regards MulM3h
11
by: =?Utf-8?B?aHVzaHRlY2g=?= | last post by:
I have a VB6 app that uses SQLServer2005 connection to store/retrieve data. I want (I think) to get access to a(some) Server events. Seems this is doable if I can instantiate the SQLConnector...
2
by: jadavmanoj | last post by:
what is Framwork? How many web framwork and stand alone Framwork?
2
by: chandan | last post by:
I had created a deployment project using ASP.net 2.0 . I have to intall Ajax and .net framwork before installing my web set up. Is there any way to install these setup inside my websetup?? ...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.