473,385 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

ASP.NET Web form, how to center the cotrols ?


Hi All,

I'm new to this forum as well as new to ASP.NET. My backgorund is ASP.
But, I'm just doing my .NET course with MS Certified training center
currently.

I have couple of questions (it may be silly for you !) and really
appreciate if you could share your expertise with me.

QUESTION - 1
-----------------

In my ASP (not NET) I managed to display HTML controls such as TEXT BOX,
BUTTON etc.. in the center of screen using HTML TAG <DIV>. and <CENTER>.

I just done one ASP.NET Applicaiton with one WebForm1 for testing which
contain number of "Server Controls". It's working fine. But, I don't
know how to center all the CONTROLS in the center of screen while it
runs !. For instance I have a client from 17" monitor or client with
screen resolution 1056x ?.

Basically I want put my all control similar to I have done in my Classic
ASP using HTML TAGS <CENTER> and <DIV> which helped me out to display
all the controls in the center of screen with size I defined with <DIV
style> Tag.

QUESTION 2
--------------
If I use ASP.NET to design form and develop applicaiton, can I do all
sort of Client validation using ASP.NET ?. For instance in Classical
ASP, I run "JavaScript" functions which execute upon "Form" onSubmit
event. This function I used to check whether user entered values in all
the fileds required !. How can I do the same in ASP.NET ?. Still do I
required JavaScript funciton to do the Client Validaiton in ASP.NET ?

QUESTION 3
-*------------

If we use ASP.NET to develop applicaiton, shall we still required HTML
controls and Client side scripts whcih normally developes uss in the
Classical ASP ?.

Hope all above make sense. Sorry for such a lenghty question..

Appreciate all your advise towards my questions.

Many thanks in advance..

Best regards,

Ahmed Jewahar
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
3 9474
Hi,

I hope I understand your questions correctly.
#1

To center your control, you can delete the style attribute in the ASP
control which generate automatically when you drag it from the toolbox to
the webform. Then, you can use "<TABLE><TR><TD
align="center">Control</TD></TR></TABLE>" to put your control in the center.

#2

Several ASP.NET validate controls is available,

#3

You still need client side script sometime when you don't want to initial a
post back to the server.

You can check out this help topic using VS 2003

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/cpgenref/html/cpconaspnetsynt
axforvalidationcontrols.htm

--

Tiki . C# Team

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.

Jul 19 '05 #2
Hi,

Thanks for your reply...

I can't avoid <DIV> as you know that it has lot of features.
for instance, suppose I have a <TABLE> contains 100+ rows, when user
user "scroll" he will be moving from first screen. If I put table within
<DIV style='width:300px;height:200px:overflow-y:scroll'>
<TABLE>
<TR><TD>
.....
<TABLE>
</DIV>

above example will provide a "scroll" within the height of 200px. So
user will be able to scroll all the records from TABLE from same screen.
When he press scroll button he will not move from first screen.
Basically this will give more readability !.

Any luck to use <CENTER> tag in ASP.NET

REgards,

Ahmed
tags
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
You can use the html tag in the same way in the ASP.NET application.

But to use "<Center>", the web application need to set to use Flow Layout.
For more information, please refer to

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/vsintro7/html/csconPositionin
gElementsInWebPages.htm

I hope this help.

Tiki . C# Team

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Jul 21 '05 #4

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

Similar topics

5
by: Ahmed Jewahar | last post by:
Hi All, I'm new to this forum as well as new to ASP.NET. My backgorund is ASP. But, I'm just doing my .NET course with MS Certified training center currently. I have couple of questions (it...
5
by: Jason Huang | last post by:
Hi, I would like to set the GroupBox's border to invisible, how to do that? Thanks for help. Jason
5
by: WilliamRLinden | last post by:
Hi world! we are pretty new to JavaScript and have been struggling for now 2 days on this problem ... We would appreciate mercy if anyone can give us some. Basically we are trying to simulate...
3
by: Bill | last post by:
I'm using the POST method to submit a simple form html page with yes/no and checkbox fields to an asp response page which stores the values in a new dim string, then uses it to build a new table...
2
by: alwaysintune | last post by:
I'm using the McFedries email form, and I can't seem to get an upload form to work. Instead of it saving to my server, I want it to send the information and the picture to my email. Here is the...
1
by: Sithlord999 | last post by:
Hello. I'm working on an email form on Dreamweaver and I'm looking for a PHP code to make it work. The form with some required fields would send the submitted information and two image attachments...
8
by: Ryan | last post by:
Ok.. I have a form with lots of stuff on it; a tool strip panel, menu strip, data binding elements (dataset, binding source, table adapter), tab control with 7 tab pages, each page contains a...
5
by: plumba | last post by:
Hi all I have a form (see below), which for some reason has decided to stop functioning all together. It just does not call up the function. It is called up in the opening <form> tag but...
13
by: DDragon | last post by:
ok here is the problem, i have to forms which have values i wish to be added together i can add together the values in one form all right but im having problems with adding the values of the other...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.