Friday, December 2, 2011

Create a Hello World web part by Visual Studio 2010

This post provides the steps for creating a basic custom Sharepoint 2010 Web Part  that can be added to your site pages by Visual Studio 2010

Step 1: Launch the Visual Studio 2010. On the File menu, click on New->Project.

 On the left panel, Select Visual C#, Sharepoint 2010. On the right panel, select Visual Web Part. Then, type the project and soluction name as well as the location.


Step 2: Specify the URL that the project will be deployed to.






Step 3: Add the following code to the file "VisualWebPart1UserControl.ascx.cs"


protected void Page_Load(object sender, EventArgs e)
{
            Label lb = new Label();
            lb.Text = "Hello world";
            this.Controls.Add(lb);
 }


Step 4: On the Solution Explorer, Right click on the Project and select Build. Right click on the project again and click on Deploy.


Step 5: Open the web browser and locate to your Sharepoint site. On Site Action menu, click on Edit Page. On Editing Tool tab, select Inser->Webpart




Step 6: Select Custom on Categories tab and click on the web part we've just created.




Then, click Add and then click on Save button on the left corner, we have the following result




Hope this helps!

7 comments:

Unknown said...

Excellent post!!! The future of .net application development is on positive note. It offers huge career prospects for talented professionals all over the world. Training on .net technology will ensure good salary package. Best DOT NET Training institute in Chennai | DOT NET Training

hari said...

Thanks for sharing such informative article on Load runner Automation testing tool. This load testing tool will provide most precise information about the quality of software.
SharePoint Course in Chennai | SharePoint Course

Anbarasan14 said...

Your blog left the readers with some kind of useful info. Have been waiting for more updates from this blog admin. Do share more.

Spoken English Classes in Chennai
Spoken English Class in Chennai
Spoken English in Chennai
Best Spoken English Classes in Chennai
Best Spoken English Institute in Chennai

Janu said...

Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!



Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery



Anonymous said...

perde modelleri
sms onay
MOBİL ÖDEME BOZDURMA
nft nasıl alınır
ankara evden eve nakliyat
trafik sigortası
dedektör
web sitesi kurma
aşk kitapları

Anonymous said...

smm panel
smm panel
Https://isilanlariblog.com
instagram takipçi satın al
HIRDAVATÇI BURADA
www.beyazesyateknikservisi.com.tr
Servis
tiktok jeton hilesi

Anonymous said...

çekmeköy lg klima servisi
ataşehir alarko carrier klima servisi
maltepe toshiba klima servisi
kadıköy toshiba klima servisi
maltepe beko klima servisi
kadıköy beko klima servisi
ümraniye lg klima servisi
kartal alarko carrier klima servisi
ümraniye alarko carrier klima servisi

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews