How to use VS to create a Visual Web Part widget

Source: Internet
Author: User
Tags visual studio

The Visual Web Parts widget is a very powerful Web Part that provides a built-in designer to create your user interface. This article explains how to create a Visual Web Part widget using Visual Studio.

Prepare, create a custom list stats, add some columns, and fill in some of the data.

Where the data type of the column is:

1. Open visual Studio and create a new blank SharePoint Project Smallvillevisualwpproject. Select Deployment as a farm solution.

2. Right-click the item to add a new item--Visual Web Part playerstats.

3. Right-click the item to add a new class Playerstat. Click OK. To modify the code:

Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Text;
   
Namespace Smallvillevisualwpproject
{
class Playerstat
{public
string PlayerName {get; set;}
public string gamesplayed {get; set;}
public string Numofgoals {get; set;}
public string Numofassists {get; set;}
public string Numofpim {get; set;}
public string Playeravg {get; set;}}}

4. The file structure should now be like this:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.