473,386 Members | 1,799 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,386 software developers and data experts.

General ASP .NET advice

Hi

I've recently upgraded from classic ASP to ASP.NET, and have been quite impressed by all the ready-to-use server controls available that you can just drop on your page, customize, and use. It really cuts down the amount of code in your page, or your code-behind page. Or so I thought...

I've been building a few websites and getting stuck quite frequently on what I would think are fairly simple things, like binding a checkbox in a gridview to a datasource, as the control is a True/False text and the DB column is a bit, or Using the footer of the gridview to insert records, which doesn't work when there are no records in the table - to name just a few.

Whenever I search online for help, most examples use AMPLE code in the codebehind. Most binding or data retrieval or general logic is actually done in the code behind. To me, this seems wrong as the whole point of .NET was to reduce the amount of code required for common web functionality.

Another classic example is that I can easily set up validation on the client side for blank fields, regular expressions, etc. But then as soon as I have a unique column on a table, there is no way in the HTML controls to validate this, so I have to use server-side (or rather, custom-written hand coded) validation in any case!!

But the more I hit little snags & bugs, the more I'm tempted to go this way myself and claim back the control that I had in class ASP. (In fact, the more this goes on, the more I'm tempted to teach myself PHP!!!)

What I want to know is, from an experienced developers perspective, is it better to code it yourself in the code-behind, using (for example) datasets and datatables and connections, rather than just dropping the server controls on the page & customizing?

I'm trying to decide on which way is better as whichever path I go down now, if it's the wrong one, it will no doubt cost me a LOT of time to change later.

Thanks for any input.
Sean
May 25 '08 #1
2 959
lotus18
866 512MB
Hi Sean

We have the same name LOL. My advice is that stick to the language that makes you feel comfortable and happy.

Rey Sean
May 25 '08 #2
Curtis Rutland
3,256 Expert 2GB
I'm trying to decide on which way is better as whichever path I go down now, if it's the wrong one, it will no doubt cost me a LOT of time to change later.
Sean
I'm not so sure that there is a wrong one. I consistently find myself doing both, depending on what the situation calls for. It's really about what works better for you; what makes more sense to you.

As for learning PHP, who says that you can't learn both?
May 25 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Örjan Skoglösa | last post by:
Hi all, My first posting here. I would be very thankful for a general advice about which "way to go" to accheive a certain arrangement on a web page. The page should show a list of items (a...
6
by: Alex | last post by:
Hello I am intersting in developing and my background is VBA used in Excel and a brief intro to Java. I am interested in learning beyond VB and feel that C++ would be a very good language to...
7
by: Joe Ross | last post by:
I've been working with Microsoft support for over 3 weeks now on an intermittent General Network Error we're seeing in our production environment between our ASP.NET application and SQL Server...
6
by: J Rieggle | last post by:
Hi there, I am stuck on a problem that relates to eCommerce sites, but isnt ASP.NET specific (sorry). The ecommerce site is working in the UK, and products will be sold in pounds stirling. ...
37
by: dmoran21 | last post by:
I am a mathematician trying to write a program in C to do some curve fitting. When I get to the point where I attempt to enter data in my arrays, I get a General Protection Exception error message....
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
0
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...
0
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,...

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.