473,796 Members | 2,708 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pass the right form input to the right control

Tom
Hi,

I have this question below but still cannot fix it.

http://communities.microsoft.com/new...reviewFrame.as
p?
ICP=msdn&sLCID= us&sgroupURL=mi crosoft.public. dotnet.framewo
rk.aspnet&sMess ageID=%253C01e6 01c3bef5%25240e 272fe0%
25**********@ph x.gbl%253E
Here are my code:

A register.aspx includes 2 user controls.

register.aspx

<%@ Page language="c#" Codebehind="reg ister.aspx.cs"
AutoEventWireup ="false" Inherits="web.r egister" %>
<%@ Register TagPrefix="web" TagName="top" Src="_top.ascx"
%>
<%@ Register TagPrefix="web" TagName="left"
Src="_left.ascx " %>
<%@ Register TagPrefix="web" TagName="bottom "
Src="_bottom.as cx" %>
<%@ Register TagPrefix="web" TagName="regist er"
Src="_register. ascx" %>

<form runat="server" method="post" ID="Form13">
<web:top ID="top1" runat="server" />
<table align="center" width="780" border="0"
cellspacing="0" cellpadding="0" >
<tr valign="top">
<td width="140">
<web:left ID="left1" runat="server" />
</td>
<td width="640">
<web:register ID="register1" runat="server" />
</td>
</tr>
<web:bottom ID="bottom1" runat="server" />
</form>

You can see that I put the form tag on a single aspx page
which includes several user controls and each of them has
a form to submit.

_left.ascx

<table width="100%" border="1" bordercolor="#9 999e7"
cellspacing="0" cellpadding="2" >
<tr bgcolor="#9999e 7" align="middle">
<td>user register</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0"
cellpadding="0" >
<tbody>
<tr>
<td width="5">&nbsp ;</td>
<td nowrap>user name:</td>
<td>

<asp:TextBox id="username" runat="server"
CssClass="form" Width="70px"></asp:TextBox>

<asp:RequiredFi eldValidator id="RequiredUse rName"
runat="server" ErrorMessage="p ls enter user name!"
Display="None" EnableViewState ="False"
ControlToValida te="username"> </asp:RequiredFie ldValidator>
</td>
</tr>
<tr>
<td width="5">&nbsp ;</td>

<td>Password: </td>
<td>

<asp:TextBox id="PassWord" runat="server"
Width="70px" CssClass="form"
TextMode="Passw ord"></asp:TextBox>

<asp:RequiredFi eldValidator id="RequiredPas sword"
runat="server" ErrorMessage="P ls enter password!"
Display="None" EnableViewState ="False"
ControlToValida te="PassWord"> </asp:RequiredFie ldValidator>
</td>
</tr>
<tr>
<td width="5">&nbsp ;</td>

<td><asp:butt on id="ibtnLogin" runat="server"
text="Submit"></asp:button>&nbs p;</td>
<td><a href="lostpassw ord.aspx" target="_blank" >Lost
password</a></td>
</tr>
<tr>
<td width="5">&nbsp ;</td>
<td colspan="2"><as p:ValidationSum mary
id="ValidationS ummary"
runat="server" ShowSummary="Fa lse" ShowMessageBox= "True"
EnableViewState ="False"></asp:ValidationS ummary>

<asp:Label id="labErrorMSG " runat="server"
CssClass="node" ></asp:Label>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
_register.ascx

It also has a register form.

Here is the _register.ascx. cs

private void Page_Load(objec t sender, System.EventArg s e)
{
// Put user code to initialize the
page here
if(!IsPostBack)
{
this.Bind_New() ;
}
}

Here is the _left.ascx.cs

private void Page_Load(objec t sender, System.EventArg s e)
{
// Put user code to initialize the
page here
}

I am not sure how to write code for these 2 Page_Load and
PostBack.

Thanks for any kind help
Nov 18 '05 #1
0 1082

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

Similar topics

2
4606
by: Matt | last post by:
How to pass data back and forth between ASP and JSP page? Let's say I have Java objects, how to pass the data back to ASP page?? Or ASP has data, how to pass the data to JSP page?? Please advise. Thanks!
7
23657
by: Matt | last post by:
In ASP, when we pass data between pages, we usually pass by query string. If we pass data by query string, that means we need to use submit button, not by regular button, and the form will pass to the server since it's GET or POST request. But if just form-to-form communication, why we need to send the form to the server? Please help clarify. Thanks!! <form action="process.asp" method="get"> //form controls <input type="submit">
3
6791
by: Nath | last post by:
Please help!? I am new to writing html, javascript, pretty new to MySQL but quite proficient at writing Perl and i'm a quick learner. I am building a database driven website and i am a little stuck: I have page of results obtained from a MySQL query presented as a table (the first column having checkboxes for each of the rows in the table, and all having the name "seqs"). I have set up a javascript (connected to a "toggle all" checkbox)...
8
2036
by: George Hester | last post by:
In a page I have when the user left-clicks the page a Input box for a form gets the focus. But if the user right-clicks the page the Input box is not getting the focus. I'd like the Input box to get the focus no matter where on the page the user clicks be it right-click or left-click. Right now there is no context menu when the user right-clicks. Do you think that's the problem? Any ideas how to get this right-click left-click Input box...
4
5394
by: Fred | last post by:
Hi, i know how to pass a value from Javascript to ASP with a hidden field into a form and submitting it, or with cookies, but here i have to pass a lot of data in an array. There is a list of product the visitor can order by clicking one or more checkboxes. I made a form containing input with type "checkbox" like: <form> <input type="checkbox" name=ck id=ck
5
2736
by: pbearne | last post by:
Hi guys I am trying to this function below I have a web form with a load of inputs text boxs etc and i need to disable them So I have tried to write a function I can call and get the function to work the type of the input so can disaable as needed
4
5751
by: ryang | last post by:
I'm sure this is an easy one for you old pros? I am using filemaker to browse some records, and I have created a button in my filemaker layout that launches a web browser with a certain url. Right know, I have to manually enter 3 numbers into 3 fields of a form on that webpage. Is there a way I could pass the info in the url so that when the page loads it will have the form already filled in with my data? I have figured out how to do this...
19
248280
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect this data is essential to any developer. This article is a basic tutorial on how to user HTML Forms, the most common method of data collection. Assumptions - Basic HTML knowledge. - Basic PHP knowledge. HTML Forms A common and simple way of...
12
11115
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
0
9685
marktang
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...
0
9533
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,...
0
10461
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10239
jinu1996
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...
0
9057
agi2029
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...
1
7555
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5447
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...
0
5579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.