473,657 Members | 2,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Basic question

I'm having a bit of trouble understanding how to get an
asp.net page to look and feel like the asp page I have
already created. It's a basic login page, which I have
attempted to create in the vs html editor as so (just the
form code):

<form id="Form1" method="post" runat="server">

<asp:table id="Table1" runat="server"
HorizontalAlign ="Center" CssClass="LogIn Head"
Width="300px">

<asp:TableRow CssClass="LogIn ">
<asp:TableCel l Text="Log In to EPES"></asp:TableCell>
</asp:TableRow>

</asp:table>

<asp:table id="Table2" HorizontalAlign ="Center"
CssClass="LogIn Body" Width="300px" Runat="server">

<asp:TableRow >
<asp:TableCel l CssClass="LogIn Desc" Text="User
ID:"></asp:TableCell>
<asp:TableCel l CssClass="LogIn Ctrl">
<asp:TextBox ID="txtUID" runat="server" Width="150px"
MaxLength="20" />
</asp:TableCell>
</asp:TableRow>

<asp:TableRow >
<asp:TableCel l CssClass="LogIn Desc"
Text="Password: "></asp:TableCell>
<asp:TableCel l CssClass="LogIn Ctrl">
<asp:TextBox ID="txtPassword " Runat="server"
Width="150px" MaxLength="20" TextMode="Passw ord" />
</asp:TableCell>
</asp:TableRow>

<asp:TableRow >
<asp:TableCel l>
<asp:Button ID="btnSubmit" Runat="server" Text="Log In" />
</asp:TableCell>
</asp:TableRow>
</asp:table>
</form>

I have tried to drag a button on to the table control in
the designer (which didn't work). The method I have used
above displays the page the way I want it to, but I can't
seem to find a way to link the controls (specifically the
button) to a server-side event.

Any help (or any links) would be greatly appreciated.

Paul K
Nov 17 '05 #1
3 1548
the table control you are using is for showing data or programatically
adressing it somehow. for your example you do not neet this, draw a
normal table instead (from the menu bar, bot the toolbox). ie use
<table>, not <asp:table>.

jj

Paul K wrote:
I'm having a bit of trouble understanding how to get an
asp.net page to look and feel like the asp page I have
already created. It's a basic login page, which I have
attempted to create in the vs html editor as so (just the
form code):

<form id="Form1" method="post" runat="server">

<asp:table id="Table1" runat="server"
HorizontalAlign ="Center" CssClass="LogIn Head"
Width="300px">

<asp:TableRow CssClass="LogIn ">
<asp:TableCel l Text="Log In to EPES"></asp:TableCell>
</asp:TableRow>

</asp:table>

<asp:table id="Table2" HorizontalAlign ="Center"
CssClass="LogIn Body" Width="300px" Runat="server">

<asp:TableRow >
<asp:TableCel l CssClass="LogIn Desc" Text="User
ID:"></asp:TableCell>
<asp:TableCel l CssClass="LogIn Ctrl">
<asp:TextBox ID="txtUID" runat="server" Width="150px"
MaxLength="20" />
</asp:TableCell>
</asp:TableRow>

<asp:TableRow >
<asp:TableCel l CssClass="LogIn Desc"
Text="Password: "></asp:TableCell>
<asp:TableCel l CssClass="LogIn Ctrl">
<asp:TextBox ID="txtPassword " Runat="server"
Width="150px" MaxLength="20" TextMode="Passw ord" />
</asp:TableCell>
</asp:TableRow>

<asp:TableRow >
<asp:TableCel l>
<asp:Button ID="btnSubmit" Runat="server" Text="Log In" />
</asp:TableCell>
</asp:TableRow>
</asp:table>
</form>

I have tried to drag a button on to the table control in
the designer (which didn't work). The method I have used
above displays the page the way I want it to, but I can't
seem to find a way to link the controls (specifically the
button) to a server-side event.

Any help (or any links) would be greatly appreciated.

Paul K


Nov 17 '05 #2
jj,

Thanks! The asp.net paradigm makes much more sense to me
now.

Paul K
Nov 17 '05 #3
There are a few ways to link an event to a button.

1. You can specify in the ASP:Button tag an OnClick that
has a method. This will require that you know the
parameters of the method Object o, System.EventArg s e

2. double click on the button in design view. This is
for those who are either 1 lazy and looking for a
shortcut, or 2 don't know how the programming language
uses Methods. This method will create the shell of a
function for you with the parameters and draw the mapping
between the button and the event method. This method
does not always work depending on how technical your page
is and if you have your button nested in a grid, etc.

3. (this if for the VB developers) Create a button in
HTML, Create a Method in the code. After the method
declaration, append Handles buttonname.clic k

4. (this is for the C# developers) Create a button in
the HTML, Create your method with the appropriate
parameters. Go to the System Generated code
InitializeCompo ntent section and create your Delegate
method reference. For example...
this.btnCancel. Click += new System.EventHan dler
(this.btnCancel _Click);
If you realy want to understand what is going on, you
should use either option 3 or option 4. It will make you
a better programmer in the long run.

Good Luck,

Keith
-----Original Message-----
I'm having a bit of trouble understanding how to get an
asp.net page to look and feel like the asp page I have
already created. It's a basic login page, which I have
attempted to create in the vs html editor as so (just theform code):

<form id="Form1" method="post" runat="server">

<asp:table id="Table1" runat="server"
HorizontalAlig n="Center" CssClass="LogIn Head"
Width="300px ">

<asp:TableRo w CssClass="LogIn ">
<asp:TableCe ll Text="Log In to EPES"></asp:TableCell>
</asp:TableRow>

</asp:table>

<asp:table id="Table2" HorizontalAlign ="Center"
CssClass="LogI nBody" Width="300px" Runat="server">

<asp:TableRo w>
<asp:TableCe ll CssClass="LogIn Desc" Text="User
ID:"></asp:TableCell>
<asp:TableCe ll CssClass="LogIn Ctrl">
<asp:TextBox ID="txtUID" runat="server" Width="150px"
MaxLength="2 0" />
</asp:TableCell>
</asp:TableRow>

<asp:TableRo w>
<asp:TableCe ll CssClass="LogIn Desc"
Text="Password :"></asp:TableCell>
<asp:TableCe ll CssClass="LogIn Ctrl">
<asp:TextBox ID="txtPassword " Runat="server"
Width="150px " MaxLength="20" TextMode="Passw ord" />
</asp:TableCell>
</asp:TableRow>

<asp:TableRo w>
<asp:TableCell >
<asp:Button ID="btnSubmit" Runat="server" Text="Log In" /></asp:TableCell>
</asp:TableRow>
</asp:table>
</form>

I have tried to drag a button on to the table control in
the designer (which didn't work). The method I have usedabove displays the page the way I want it to, but I can'tseem to find a way to link the controls (specifically thebutton) to a server-side event.

Any help (or any links) would be greatly appreciated.

Paul K
.

Nov 17 '05 #4

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

Similar topics

6
2474
by: pauldepstein | last post by:
I am reading Grimshaw and Ortega's "C++ and Numerical Methods." They construct a vector class which contains the variable vec, a float* variable where the length of the array (number of components in the vector) is given by the variable name veclength. That is what I _do_ understand. What I don't understand is the coding for the default constructor which includes vec=0; What does it mean for a pointer to be equal to 0? Presumably...
6
5113
by: DH | last post by:
I have a VERY basic question about figuring database size. I've inherited a database which is generally similar to this basic one: Item, Red, Blue, Green, Yellow (text), (int),(int),(int),(int) box, 1,0,0,2 hat, 0,0,0,1 car, 3,0,0,0 This format leads to a lot of zeros in the rows which take up a lot of
9
2232
by: Malcolm | last post by:
After some days' hard work I am now the proud possessor of an ANSI C BASIC interpreter. The question is, how is it most useful? At the moment I have a function int basic(const char *script, FILE *in, FILE *out, FILE *err); It returns 0 on success or -1 on fail.
4
2220
by: Ramesh | last post by:
hi, Let me ask some basic questions. Can anybody explain me about the following questions: 1. When we have to create sn key? Whenever we compiled Component we have to create or it is a one time process? 2. What information contained in sn key. I gone through that it is having public key. How it is using this key to intract with client. 3. When we have to run gacutil.exe file. Whenever we
13
15549
by: Pete | last post by:
I'm cross posting from mscom.webservices.general as I have received no answer there: There has been a number of recent posts requesting how to satisfactorily enable BASIC authorization at the HTTP level but as yet no fully useful answer. I too have been trying to call an apache/axis webservice which desires a username/password from my C# Client. (ie the equivalent of _call.setUsername("Myname") name from within a Java client proxy)...
5
1804
by: Aussie Rules | last post by:
Hi, Having a mental block on this one. Have done it before but can't rack my brain on how... I have an object, with a bunch on property, and I add that object to a combo box. I want the property '.fulladdress' to be the value that appears in the drop downs text section. How to I set that parameter to be the one shown inthe drop down
4
1723
by: MikeB | last post by:
I've been all over the net with this question, I hope I've finally found a group where I can ask about Visual Basic 2005. I'm at uni and we're working with Visual Basic 2005. I have some books, - Programming Visual Basic by Balena (MS Press) and - Visual Basic 2005 by Willis (WROX), but they don't go into the forms design aspects and describing the various controls at all. What bookscan I get that will cover that?
1
1488
by: frankhanretty | last post by:
Do I have to install Visual basic on the remote terminals as I did on the server? I have an visual basic 5 application running fine on my client's server and he is now networked. He wants to run the visual basic applicaton that runs on his server on the remote terminals. (he has two networked to his server) My question is do I now have to install visual basic on the two terminals also? Thank you in advance to anyone who can answer this for...
4
3090
by: Chris Asaipillai | last post by:
Hi there My compay has a number of Visual Basic 6 applications which are front endeed onto either SQL Server or Microsoft Access databases. Now we are in process of planning to re-write these applications into Visual Basic.Net. My managers main thought is that Visual Basic 6 is (or has!) stopped being supported by Microsoft.
3
1938
by: Scott Stark | last post by:
Hello, I'm trying to get a better handle on OOP programming principles in VB.NET. Forgive me if this question is sort of basic, but here's what I want to do. I have a collection of Employee objects that I can iterate through relatively easily. I've included code at the bottom of this message. I can pretty easily iterate through my employee objects like so: Dim theEmployees As Employees = New Employees
0
8420
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
8324
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
8617
tracyyun
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...
1
6176
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
5642
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();...
0
4173
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...
1
2743
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
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
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.