|
-
Dec 21st, 2004, 11:59 AM
#1
form layout
I need to create an ASP.NET application for our customers to access their account online... I don't do much in the way of web programming, so I am wondering what the best set of tools to use is, should I use HTML controls, or web forms controls, grid, or flow layout?
I have tried messing around with several of these, but I heard all this hype about how easy it was to layout forms and stuff, and it still seems rather cumbersome like it has always been.
-
Dec 22nd, 2004, 02:56 PM
#2
PowerPoster
Re: form layout
I dont know this is the best way, but this is what I have been using:
I use the FlowLayout for the Forms, and use tables so that they fit most of the resolutions, the site is viewed in.
Server Controls when I need some proessing to be done with the control at the server end and nothing at the client side.
I use Dreamweaver for the designing and Studio when I have to write the code.
-
Dec 22nd, 2004, 11:13 PM
#3
Frenzied Member
Re: form layout
FWIW, this is what I do:- Web Forms contols unless impossible, like uploading a file.
- Grid layout
For the most part I just go with the defaults, except for the layout.
-
Dec 23rd, 2004, 09:36 AM
#4
Frenzied Member
I create an HTML page in Homesite. It has the text and form controls all laid out the way i want them. Then i paste the HTML into the ASP.NET page, and replace the HTML form controls with ASP.NET controls.
There are many different ways of doing it. It just depends on how many pages you have, and how you want to maintain them.
~Peter

-
Dec 23rd, 2004, 11:01 AM
#5
Re: form layout
well this is for our accounts online application... it will basically consist of a login form, a main accounts page, and then a few other odds and ends forms, like order placing, and other such things...
how much overhead do web controls really create? our site wouldn't be getting TONS of traffic, and for the most part everything is pretty basic on there. There is a lot of DB interaction because all account info is on a sql server.
-
Dec 23rd, 2004, 11:05 AM
#6
-
Dec 23rd, 2004, 11:12 AM
#7
Addicted Member
Re: form layout
You should use webserver controls sparingly. I would recommend you not use labels as they are not really needed most of the time. Web server controls slow down your page loading because the server has to interpret them into html controls. I also recommend you turn off Viewstate if you don't need it, that will speed things up too.
-
Dec 23rd, 2004, 11:23 AM
#8
Frenzied Member
Re: form layout
Correct me if i'm wrong,.....
Viewstate is what keeps a value in a textbox on a postback? I haven't found an instance where i didn't want to keep what the user had typed in or selected on the page.
~Peter

-
Dec 23rd, 2004, 11:34 AM
#9
Addicted Member
Re: form layout
You are correct in that instance, but if the page simply displays data and nothing more, you would want to turn off viewstate at the page directive for that page. Viewstate does not only apply to certain web server controls, it applies to them all. So if you were displaying a datagrid with 1000 rows from a database and did not run off viewstate, it would create a viewstate element off all those records. So if you were to view source, you would see all the view state gibberish it creates. Turning off viewstate would tell the server not to record all the information for the page, which in turn makes your page run and display faster.
ViewState and Performance
By default ViewState is enabled in an ASP.NET application. Developers should be aware that any data in ViewState automatically makes a round trip to the client. Because the round trips contribute to a performance overhead, it is important to make judicious use of ViewState.
This is especially important when your application contains complex controls such as a DataList or DataGrid but is generally true when you are presenting considerable information via a server control. An example might be presented a list of countries for selection ... you don't want to impose the overhead of transferring all the country text back and forth from server to client and vice versa more than is strictly necessary. It will significantly impact on response times if you don't disable the ViewState either for the page as a whole or for the specific controls causing the unnecessary overhead.
Whenever you complete a web forms page you should review the controls in the page and consider what is being passed in the ViewState and whether you really need all that information to be passed. To optimise Web page size you may want to disable ViewState in the following cases, amongst others:
--when a page does not postback to itself
--when there are no dynamically set control properties
--when the dynamic properties are set with each request of the page
reference: http://www.dotnetjohn.com/articles/articleid71.aspx
Last edited by rdove; Dec 23rd, 2004 at 11:39 AM.
-
Dec 23rd, 2004, 12:33 PM
#10
Re: form layout
i would imagine viewstate would be good on lets say, a data entry form that gets validated on the server and if there is an error, brings the form back up with the error.. but the data is still present.. you coudl do this with regular ASP, but it would take a good amount more coding than just setting a property to true
anyway its not internal, it would be for the world to see.... I can use regular HTML elements I guess, but then I feel like what is the point of ASP.NET, I thought the big to do about it was the fact that you could have these server controls and everything.. but then everyone says dont use them because they are slow...
Mike Hildner, since you are one of the few that said you use them regularly, what type of performance issues have you come across?
-
Dec 23rd, 2004, 01:06 PM
#11
Frenzied Member
Re: form layout
Well, I'm feeling a little sheepish because the experienced ones have spoken and don't think that's a good idea.
To be honest, I'm real new to this ASP.NET business. Not too long ago my boss asked me if I could do this project, and I said "sure, not a problem" . So I stuck with all the default stuff I could, and it seems like you're supposed to use the Web Forms controls, so I did.
The app has been running on a brand new, fast server, and over a T1 line, so I haven't even seen any performance problems. Probably just my lack of experience that has not made me change anything.
-
Dec 23rd, 2004, 03:28 PM
#12
Addicted Member
Re: form layout
I'm not saying not to use them. I use them quite often. I am speaking of not over using them. Like if I had a registration form, I would use textbox and button controls, but I would not use label controls for the descriptions of the fileds, like username, password, etc... I would use standard text for that. The biggest thing is not to go crazy and use them for every possible thing imaginable.
-
Dec 23rd, 2004, 10:25 PM
#13
PowerPoster
Re: form layout
Well, the first time I tested, labels were faster. The results are below.
Subsequent tests yielded that the plain html was faster. But, it was only 25 milliseconds faster. So unless you are serving up 100 pages a second, which I highly doubt, then you are fine to use labels.
I have NEVER seen a ASP.NET application out there that performance hangs on using labels or not.
Last edited by hellswraith; Dec 23rd, 2004 at 10:35 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|