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

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

Does anyone know how to create a page that has Code behind in Sharepoint.

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :SharePoint
I am creating a page that will need some controls for dropdowns and radio buttons etc and I need to know if and how to setup and create a page in Sharepoint that has the code behind to handle click events, onselectedchange like .NET does.

View Complete Post

More Related Resource Links

create a form to create an ascx page and code behind for it

Is is possible to build a form, accept parameters and from THAT construct a new .ascx page AND the code behind for that page? What I'm proposing is having some code snippets that just need parameters added and can then be used to create a web user control that can be added to existing pages. This .ascx file would be a real file after creation, not dynamic every time.I don't know if I'm describing it very well, maybe someone could point me in the right direction.

Add Calendar through code to page SharePoint 2010 - help

I am add a calendar to a page through a feature.  How do I set the view to be 'All Events'.  Currently the page gets rendered with the calendar in full graphic mode (showing all days in the month). I would like to through code have the calendar be visible by default 'All Events' ..help? I am using code similar to the following.  You can see some of the things i have tried (commented out lines)  ListViewWebPart calendarWP = new ListViewWebPart();                                     SPList calendarList = site.Lists["Calendar"];                                     //SPView view = calendarList.Views["All Events"];                                     calendarWP.ListName = calendarList.ID.ToString("B").ToUpper();                                     calendarWP.TitleUrl = calendarList.DefaultViewUrl;                                     calendarWP.WebId = calendarLis

How to Create a Tab View in sharepoint page

Hi All, I want to create 5 tabs in sharepoint page please tell me how can I do that and what controls I must use? see the sample example here: http://www.transport.govt.nz/   thanking you

How To Create Tabs in SharePoint Page through Designer


Hello friends,

This is siddiqali new to sharepoint want to Know how to create a tabs in sharepoint page without using code and visual web part,I am trying it to do with

designer as sharepoint is code free tool ,so am tring to do the task  without code  .I knew to create a tab on top link bar but my task  to do on page


Thank You,


Create new aspx-page from code


Hello everyone.

I'm am looking for a general idea about the following:


My customer is looking for an application - a sort of webshop-like thingie, where each product has its own infopage with a unique URL.

He does NOT want an actual CMS.

I could - and probably will - use querystrings, like http://www.example.com/products.aspx?pID=21, and then get the content from the database, but is it possible - or rather possible without too much bother - to let the administrator input text via a webform, and then form code create a contentpage like http://www.example.com/product21.aspx

Have a nice weekend



How to create a code behind page when page was created in expressions web


 When an ASPX page is created and designed in Expressions Web (which has no code behind page check box), how do I add a code behind file in VWD2008? 

The help says the following:

Adding code-behind files in ASPX or ASCX files within a traditional ASP.NET 2.0 environment is very easy thanks to Microsoft Visual Studio. All you have to do is right-click the file in Visual Studio, either in Solution Explorer or in the designer, and select View Code. Visual Studio then creates a new code behind file (if one did not already exist)

but doing the above simply displays the ASPX page. 

I follow creating a code behind page when creating a new ASPX page in VWD2008 (although I have not done it) by simply checking the box.

Any ideas?



[Sharepoint 2007]Parse error when I add code behind the page to a normal aspx page ?


Hi all,

I dont need this form to be embedded into Sharepoint. I am adding this webpage into Sharepoint because i has issues due to cross-domain permission. I cannot call refresh sharepoint from my op up window  webpage. Therefore i want to add my webpage into the same domain as sharepoint.

I have added the webpage aspx form into Sharepoint from the sharepoint designer 2007. I would like to add code behind the page too.

What i have done at the moment was to create a project in visual studio for the code behind the page. I folloed this article :



Then i have added the dll intothe bin of my sharepoint site. i have also added in webconfig the dll.

However i got the following error :

Parser Error Message: The codefile attribute on the page directive is not allowed in this page.

Source Error: 

Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="FormOragniseMeeting.aspx.cs" Inherits="FormOrganiseMeeting.FormOrganiseMeetingCodeBehind" %>
Line 2: 
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">





How to create a custom page layout in sharepoint foundation 2010



I need to create a custom page layout in sharepoint foundation 2010.

I am aware that wss 3.0 and sharepoint foundation do not have the publishing infrastructure.

I need to know if the same procedure that is used to create custom web part pages in WSS 3.0 is to be used in SharePoint foundation too or are there other ways.

I am relatively a fresher to sharepoint technology.Please help.

Thanks in advance:D.


Utilizing Code-Behind to Migrate Custom App Page to SharePoint


I am in charge of migrating an existing ASP application to SharePoint 2k7 (Enterprise).  This existing application displays data from an Oracle database (which I've already implemented using BDC) but also has a page that generates mailing labels based on a custom query to the same Oracle database.  Basically the user provides a list of SSNs, the database is queried to pull back addresses for those SSNs, and finally the addresses are printed on paper with the appropriate spacing.  In order to completely migrate this application to SharePoint I need to somehow port the mailing label capability into SharePoint.

My first thought was to create a new web form page in SharePoint Designer with a Repeater.  I'd then use the code-behind to query the database and populate the Repeater.  I quickly found out there are no code-behinds in Designer.  Since I'm new to SharePoint I'm really lost as to how to proceed.

What would be the best way to address this issue?

How to create Responce page for your sharepoint Survey


I am pretty new on sharepoint. I created survey page in sharepoint designer and it works, but i am confused how do we save those responce from users now

I know when you create survey in your sharepoint team site it automatically saves your responce. But i want to create that in sharepoint designer where i can make a page where i can save  responces from users . How do i do that, i have no clue how to do it .

Can anyone please help

Thank You

Navin Pokhrel

How to create a Blog using code in Sharepoint 2007


Hi All,

  I have a requirement to create a Blog in Sharepoint 2007, how to create one using C# code. any help is appreciated.




Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Create/add table from code to database



I create table:

                  DataSet data=new DataSet();

                  DataTable myTable = new DataTable("NewTable");

                   DataColumn[] keys = new DataColumn[1];

                   // create column
                   keys[0] = new DataColumn();
                   keys[0].DataType = System.Type.GetType("System.String");
                   keys[0].ColumnName = "PointID";
                   myTable.Columns.Add(keys[0]);    &nb

Wicked Code: Silverlight Page Turning Made Simple


As we'll show, with just a few lines of JavaScript you can build a general-purpose framework for incorporating page turns into Silverlight 1.0 apps.

Jeff Prosise

MSDN Magazine May 2008

C#: Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes


In this article Juval Lowy describes how exciting new features in Visual Studio 2005, that will improve your overall productivity compared to the first version of C#, so you can write cleaner code faster.

Juval Lowy

MSDN Magazine Visual Studio 2005 Guided Tour 2006

C# 2.0: Create Elegant Code with Anonymous Methods, Iterators, and Partial Classes


C# 2.0 introduces a wealth of exiting new features, such as generics, iterators, partial classes and anonymous methods. While generics are the most talked-about feature especially for former classic C++ developers, the rest of the new features are important additions to your .NET development arsenal, enhancing power and improving overall productivity. This article is dedicated to all the new C# 2.0 capabilities besides generics to give you a good overall picture of the upcoming features.

Juval Lowy

MSDN Magazine May 2004

Code Name Avalon: Create Real Apps Using New Code and Markup Model


The presentation subsystem in the next version of Windows, code-named "Longhorn," offers powerful new capabilities to developers. This subsystem, code-named "Avalon," allows developers to take advantage of its capabilities through a new markup language code-named "XAML." In addition, modern object-oriented programming languages such as C# and Visual Basic .NET can be used to tie everything together. Because most applications written to Avalon will probably be a mix of XAML and programming code, this article discusses XAML tags used to control page layout along with the procedural code written to respond to events.

Charles Petzold

MSDN Magazine January 2004

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