.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Is it beneficial to use "Code behind" in all sites

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :ASP.Net

I have been using ASP.net for a while now, but just as a hobby on my own.

So, I've never learned some of the more in-depth things like "Code behind".

Is it always beneficial to use it, or is it just a issue of preference?

If it is always beneficial, then does anyone have any links that point to some good training on the topic? 

View Complete Post

More Related Resource Links

SharePoint Tutorial - Team Sites

Team sites are small web sites that are created to store everything about a particular thing. For example a site can be created for a department in an organization like human resources. I site can be created for a particular project. A site can even be created for a meeting. Everything about the thing (department, project, meeting) like documents, lists, calendars, etc. is stored in that site.

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

2 Web Sites


Does anyone know if it is possible to pass a Session variable from one web site, to another web site?  I am writing both.  They are located on the same server - but with different URL's... different projects... 

Creating Event Handler in Code behind


Hi, so I have a control that is created in the code behind and generates fine but I can't figure out how to create an event handler for it.  I've found plenty of examples for it in C sharp, but none of them seem to apply to VB.  What I want to do is essentially this:

myDropDownList.SelectedIndexChanged = "Event to do here"

but it doesn't seem to work for me.

Any suggestions are appreciated.

Resource File: Creating Privacy-aware Web Sites


Privacy issues are of primary concern to those involved in Internet commerce. Some consumers are hesitant to provide information to Web sites without clearly understanding how their data will be used and with whom it will be shared.

MSDN Magazine August 2003

Spider in .NET: Crawl Web Sites and Catalog Info to Any Data Store with ADO.NET and Visual Basic .NE


Visual Basic .NET comes loaded with features not available in previous versions, including a new threading model, custom class creation, and data streaming. Learn how to take advantage of these features with an application that is designed to extract information from Web pages for indexing purposes. This article also discusses basic database access, file I/O, extending classes for objects, and the use of opacity and transparency in forms.

Mark Gerlach

MSDN Magazine October 2002

ASP.NET Security: An Introductory Guide to Building and Deploying More Secure Sites with ASP.NET and


Forms authentication is one of the most compelling and useful new features of ASP.NET. It enables developers to declaratively specify which files on their site can be accessed and by whom, and allows identification of a login page. When an unauthenticated user attempts to retrieve a page protected by forms authentication, ASP.NET automatically redirects them to the login page and asks them to identify themselves. Included here is an overview of forms authentication and what you need to know to put it to work. Also included is hard-to-find information on the security of cookie authentication and on combining forms authentication with role-based URL authorizations.

Jeff Prosise

MSDN Magazine May 2002

ASP.NET Security: An Introductory Guide to Building and Deploying More Secure Sites with ASP.NET and


ASP.NET and Microsoft Internet Information Services (IIS) work together to make building secure Web sites a breeze. But to do it right, you have to know how the two interrelate and what options they provide for securing access to a Web site's resources. This article, the first in a two-part series, explains the ABCs of Web security as seen through the eyes of ASP.NET and includes a hands-on tutorial demonstrating Windows authentication and ACL authorizations. A range of security measures and authentication methods are discussed, including basic authentication, digest authentication, and role-based security.

Jeff Prosise

MSDN Magazine April 2002

web sites made with visual webdeveloper express 2010


Good evening,

just a quick question, are there a lot of developers using  the express edition to make web sites, or is it limited to what you can do, and I would be  better getting the full edition visual studio 2010. I have been using dreamweaver, but I wanted to try my hand at asp.net, thx for any info you can offer.

Dynamic Data (Scaffolding Templated Sites) [REPOST]


Just been using this for a few days, but love it already.

I was wondering what some of the plans were for things like role/user-level security, or even 'type' security.

For some real-world 'for-instance' examples:

  • How would I go about deciding/filtering out which tables are visible?
  • What would the guidance be for making a particular field available to edit for a particular user (set of users)?
  • Can I tie into events (or something) at the model level to filter out data?

I easily built a custom control based off some of your examples and it's already up and working in the site.  I can really see where this is going to help in the protyping of admin apps, specifically with internal or early-versions of software, and while I get the idea it is really a springboard for more complex development, what is available here is just awesome.

 Thanks for any info/suggestions to the above questions.



Design for Easy Integration into Customer's Sites


This is my second ASP.net project, and I'm looking for suggestions or approaches rather than specifics, but here goes.

The project, once done, will provide a "portal" into a limited portion of the client's database.  All clients are using a SQL database, but various server software products are involved (MSSQL, MySQL, and others). 

My question, however, has more to do with the "look and feel" of the finished product.  We want to be able to integrate our 'portal' easily into the client's websites and have it look as seamless as possible.  Obviously, placements of logos, etc. -- but also colors, fonts, etc.

Client sites tend to be simplistic in design.  We envision the customer placing a link to our site from theirs, and our site will be running on IIS on their server.  At least that's the plan.

The goal right now would be to make as much of this "parameter driven" as possible, so that a lot of the install can be accomplished through some simple settings, isolated in one or two files such that at installation time we can tweak those settings and be up-and-running in a short period of time with a site that integrates reasonably well with the customer's. 

But I'm uncertain as to whether there is a better approach.  Obviously, we could try to redes

How to make expanding/collapsing CollapsiblePanelExtender from code behind smooth and animated


I've got a CollapsiblePanelExtender in place on a panel in test and it works like a champ. (I get excited about the simplest things).  When I click the panel header it expands and collapses with smooth animation, as expected and desired.

But when I change its state via code behind, it seems I am merely changing its state and somehow bypassing the javascript that controls the smooth animation.

My markup is out of the box. I have added code behind and some javascript, but I am missing the connection.  Here is the javascript:

function pageLoad(sender, args)

function smoothAnimation()
    var collPanel = $find("CollapsiblePanelExtender1");
    collPanel._animation._fps = 45;
    collPanel._animation._duration = 0.50;


And here is the code behind:

protected void btnExpand_Click(object sender, EventArgs e)
    this.CollapsiblePanelExtender1.Collapsed = false;
    this.CollapsiblePanelExtender1.ClientState = "false";

protected void btnCollapse_Click(object sender, EventArgs e)
    this.CollapsiblePanelExtender1.Collapsed = true;

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend