I'm using .NET framework 1.1 and VS.NET 2003 for a aspx web form.
There is a DropDwonList on the page and its SelectedIndexCh anged event is
fired to the server normally, until when I add another form "FormDummy" onto
the main form, and then the event no longer fires again when the user change
the value of the drop down list.
Can anybody help ? Thanks so much!
The aspx code is as follows:
(Every thing works fine is the form "FormDummy" is abscent !)
<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Web Form1.aspx.vb"
Inherits="HKG.W ebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<form id="FormDummy" method="post">
</form>
<form id="Form2" method="post">
<asp:DropDownLi st id="DropDownLis t1" style="Z-INDEX: 101; LEFT: 168px;
POSITION: absolute; TOP: 64px"
runat="server" Width="160px" AutoPostBack="T rue">
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
</asp:DropDownLis t>
</form>
</form>
</body>
</HTML> 4 4829
> There is a DropDownList on the page and its SelectedIndexCh anged event is fired to the server normally, until when I add another form "FormDummy" onto the main form, and then the event no longer fires again when the user change the value of the drop down list.
George,
An ASP.NET WebForm page can have only one server-side Form tag.
And if you want to catch server-side event(s) for a web control, then
place it within the one server-side Form tag.
--
Thanks,
Carl Prothman
Microsoft ASP.NET MVP
Hire top-notch developers at http://www.able-consulting.com
Yes there is only one server side form <Form1> on the page, and <FormDummy>
and <Form2> are just client side form tags without runat="server" attribute.
The behavior is that the drop down list under <Form2> (which is under
<Form1>) fires the SelectedIndexCh angedEvent, but it does not fire when I add
<FormDummy> under <Form1>. <FormDummy> is in the same level as <Form2> and
just has nothing to do with the drop down list.
Many thanks.
Best Regards,
George
"Carl Prothman [MVP]" wrote: George, An ASP.NET WebForm page can have only one server-side Form tag. And if you want to catch server-side event(s) for a web control, then place it within the one server-side Form tag.
--
So what I mean is the event is still not fired if i have a dummy form
besides the form hosting my webcontrol.
Any ideas? Thx.
"Carl Prothman [MVP]" wrote: There is a DropDownList on the page and its SelectedIndexCh anged event is fired to the server normally, until when I add another form "FormDummy" onto the main form, and then the event no longer fires again when the user change the value of the drop down list.
George, An ASP.NET WebForm page can have only one server-side Form tag. And if you want to catch server-side event(s) for a web control, then place it within the one server-side Form tag.
--
Thanks, Carl Prothman Microsoft ASP.NET MVP
Hire top-notch developers at http://www.able-consulting.com
> I'm using .NET framework 1.1 and VS.NET 2003 for a aspx web form. There is a DropDwonList on the page and its SelectedIndexCh anged event is fired to the server normally, until when I add another form "FormDummy" onto the main form, and then the event no longer fires again when the user change the value of the drop down list.
<form id="Form1" method="post" runat="server">
<form id="FormDummy" method="post"> </form>
Nested forms aren't valid HTML anyway. Whatever you're trying to do, you're
going about it wrong. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ricki Susic |
last post by:
Hi,
Can anyone tell me if it is possible to call a function from a html form,
where the function is included in the same file as the form.
<html>
<body>
<form method="post" action="what do I write here to acces function test()">
<input type="text" name="tekst">
|
by: Keiron Waites |
last post by:
I have the following code:
<input type="text" name="search" class="search_top"> <a href=""
onclick="window.location='search.inc.php'+document..search.
value; return false;" class="search_top">go</a>
What do I put within to access the value of the input field search so I
can access it's value?
Thanks,
|
by: Ben |
last post by:
Here's my form:
<form name="aForm" method='post'>
<input type=file name=file1 onkeypress='KeyPress()'><br>
<a
id='attachMoreLink'
href='javascript:AddFileInput()">Attach More Files
</a>
<input type=submit value='Done'>
</form>
|
by: Howard Jess |
last post by:
In Opera 8.01 (Linux; Build 1204) and in Opera 7.54 (Windows XP; Build 3865),
my form disappears from the HTML markup (below). To summarize:
1) In a <script> block in the <head> I create a form element (part of
object/feature/bug detection).
2) There's a <form> element defined in the <body>, with the id 'theForm'.
3) The onload function tries to access that form, and also counts the
total number of forms in the document. It fails to...
|
by: Phlip |
last post by:
HTMListas:
(Apologies for I can't Google for this - too many common words.)
I have a <form> tag.
It thinks I want a <p> break before and after the form. I don't. (My forms
are sneaky and inline.)
How do I avoid paragraph breaks around a <form> tag?
| |
by: snacktime |
last post by:
I've searched and searched and have not found a solution to suppress
the margin on form or href tags so that there is no space before or
after the tag. The only way I have found to do this is to place the
tags one after another without any spaces between them.
For example, a space gets rendered between these two href's when
displayed in firefox or IE.
<a href="#"><img border="0" height="10" src="test.gif" width="10"
/></a>
|
by: rob c |
last post by:
This is a minor thing and only appears in IE (so far), but I'd like to know to
correct it (if possible).
Whenever I use a form on a webpage, Explorer always leaves a blank line
following the </form> tag but Mozilla doesn't. Is there a way to supress the
blank line?
Thanks
Rob
www.rcp.ca
|
by: Coward 9 |
last post by:
HI,
I saw in an example hello.aspx, there is a <form tagbeing used like
<form runat="server>
I search all html tag references and could NOT find "runat" attributes
for <formtag.
which reference should I use in order to find that?
|
by: neverquit |
last post by:
hi ,
Iam Nagesh,Begineer in using Ajax,well
i have been using ajax in application, i have faced a problem while placing the responseTEXT into the <div> tag positioned inside the <form> tag
iam able to get the response in the <div> tag in mozilla (im takingthe HTML response),
<script>
function confirm()
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |