Hi,
Im having a problem with an aspx page that I'm building (and rather urgently
needing to complete!).
Situation is this...
Im transforming some XML using an XSLT which builds an HTML form using an
aspx (C# - using VS.NET). Within the resulting HTML is a form, which
contains the following :
<form method="POST" action="recieve Form.aspx?lang= eng">
That posts to the page 'recieveForm.as px'.
'recieveForm.as px' recieves the form and processes the data from the form
elements
and stores them in a database.
The issue I have is that the Page_Load event (which calls my subsequent data
store method) gets called twice, and after further testing it appears all
the page methods run twice.Which results in me having duplicate records
within my data table.
Having searched through a lot of articles in the newsgroups I can't seem to
find a resolution or a reason for this happening.
I am not implementing AutoEventWireUp and I do not have a Handles
declaration at the end of the Page_Load Method.
IsPostBack is false both times the method is executed.
What Im looking for is a solution and hopefully an explanation of why this
should happen - surely you can post an HTML form to an aspx page and recieve
the Headers as normal?
Would appreciate any help anyone can give.
LB 1 5826
DOH!
Im concentrating too much on my code rather than the HTML Output!
Ignaciao, as you rightly guessed I was using an image button and it also had
an onClick event! Thanks sooo much!
Lewis
"Ignacio Machin" <ignacio.mach in AT dot.state.fl.us > wrote in message
news:On******** ******@tk2msftn gp13.phx.gbl... Hi Lewis,
I would like to see some code to bemore precise, how do you post the
form? for what you see it seems that the browser send two request to the page, maybe you are calling submit twice, maybe the submit is a image button ( that by default make a submit ) and in the onclick you are calling a function that call also form.submit therefore two submit are send to the server anyway I think that you should look at the code generated in the client.
Hope this help,
-- Ignacio Machin, ignacio.machin AT dot.state.fl.us Florida Department Of Transportation
"Lewis" <Lewis_at_arc_d ot_com> wrote in message news:3f******** *************@n ews.dial.pipex. com... Hi,
Im having a problem with an aspx page that I'm building (and rather urgently needing to complete!).
Situation is this... Im transforming some XML using an XSLT which builds an HTML form using
an aspx (C# - using VS.NET). Within the resulting HTML is a form, which contains the following : <form method="POST" action="recieve Form.aspx?lang= eng">
That posts to the page 'recieveForm.as px'. 'recieveForm.as px' recieves the form and processes the data from the
form elements and stores them in a database.
The issue I have is that the Page_Load event (which calls my subsequent data store method) gets called twice, and after further testing it appears
all the page methods run twice.Which results in me having duplicate records within my data table.
Having searched through a lot of articles in the newsgroups I can't seem to find a resolution or a reason for this happening.
I am not implementing AutoEventWireUp and I do not have a Handles declaration at the end of the Page_Load Method. IsPostBack is false both times the method is executed.
What Im looking for is a solution and hopefully an explanation of why this should happen - surely you can post an HTML form to an aspx page and recieve the Headers as normal?
Would appreciate any help anyone can give.
LB
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: zoltix |
last post by:
Hi,
I am beginner in aspx. I would like to intercept all click events on
my document. I use this function in javascipt for that
document.onmousedown=click;. It works well. But I would like to
continue the execution code on a other button or anything else.
Example
1) Click anywhere intercept click->Execute the code in function click().
|
by: Lewis |
last post by:
Hi,
Im having a problem with an aspx page that I'm building (and rather urgently
needing to complete!).
Situation is this...
Im transforming some XML using an XSLT which builds an HTML form using an
aspx (C# - using VS.NET). Within the resulting HTML is a form, which
contains the following :
<form method="POST" action="recieveForm.aspx?lang=eng">
|
by: Jarek |
last post by:
Hi!
I have a page containing datagrid. When datagrid is edited there is a
calendar. When I change the date for the first time all page events are
executed twice and:
when they are executed for the first time they are executed in response to
post back as it should be, but for the second time the page is reloaded
again just like it would be called for the first time.
Please Help Me!
|
by: Arpan |
last post by:
I am working on Win 2K Pro & use IIS 5.0 as the local server. I have installed Microsoft .NET Framework 1.1 to create ASPX web pages (using VB.NET) but when I am trying to execute an ASPX code, the browser just displays the text, if any, and the entire ASPX code gets neglected. For e.g., consider the following simple ASPX code:
<%@ Page Language="VB" Debug="True" %>
<html>
<body>
<form runat="server">
Name : <asp:TextBox id="txtName"...
|
by: Kentamanos |
last post by:
Please don't ask me why I'm doing this (trust me, it makes sense in my system), but I'd like to basically redirect requests for a certain extension (thus a handler) to an ASPX page behind the scenes.
I've created a handler and set it up to handle the extension in question. In my ProcessRequest, I'd like to basically figure out which ASPX page to "forward" the request to. I've tried all sorts of methods (Server.Transfer and Server.Execute for...
| |
by: jonhyland |
last post by:
Hey all,
I'm writing a .NET application where I want all HTTP errors such as 404
to redirect back to the home page.
Since .NET only handles HTTP errors if the client is requesting a .NET
resource (.ASPX, whatever), I need to go into IIS -> Custom Errors tab
and set my homepage under each HTTP error I want to handle. This
allows my page to be shown if someone requests an .ASP or .HTM page
that doesn't exist.
|
by: Peter Rilling |
last post by:
I have an interesting issues that, although I not blocking me, is not very
performance. Maybe someone can suggest a better way of doing this.
1) I have a page that displays a grid with command links such as Delete.
Obviously if this link will delete the item of the current line.
2) The grid is initialized during the Init event so that the events can be
bound. It is my understanding that events do not get fired unless the
object...
|
by: TS |
last post by:
Hi, i have inherited a page from another user. The page is the target frame
in a frameset. for some reason the whole page runs twice (page_load, init,
etc. all run twice)
I can't figure out how this is happening. there are no transfers or
redirects that are occurring in the pages. the page runs thru all of its
events then starts all over again. Trying to inspect the stack track doesn't
help because when i get to the init the 2nd time,...
|
by: Joey |
last post by:
I have several asp.net 2.0 apps written in VS2005 in C#. For each one,
I like to create and track page view events, increment counters, etc.
I do this in a block on each page, like this...
protected void Page_Load(object sender, EventArgs e)
{
if(!this.Page.IsPostBack)
{
Event.Write(EventSource.UserActivity,EventType.Informational,"My
event text");
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |