Skip to main content
2 of 3
added 930 characters in body
Arsalan Adam Khatri
  • 14.5k
  • 3
  • 37
  • 59

Yes, you can create Visual Web Parts in Visual Studio for SharePoint

Look Create Visual Web Parts in SharePoint 2010

You can use ASP.NET Controls in your Visual Web Part, you can drop this Visual Web Part after deploying your solution to any SharePoint Page (Publishing Page, Web Part Page etc.)

For showing list items you can either use GridView ASP.NET control or Repeater ASP.NET Control.. Or you can use SPGridView control which renders just like a SharePoint View.

For dropping the Visual Web Part on a Custom Application Page, you can use SharePoint Designer to drop the Web Part in your Application Page.. It will Register the assembly for the Web Part at the top of Application Page and will consume the Web Part.. Example is shown below:

Register Tag

<%@ Register tagprefix="CustomContainer" namespace="Namespace.VWP.MyVisualWebPart" assembly="Namespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=902c3e196fff777a" %>

Consumption

<CustomContainer:MyVisualWebPart runat="server" Description="MyVisualWebPart" Title="MyVisualWebPart" __MarkupType="vsattributemarkup" __WebPartId="{AC7575C2-666C-4729-B0A2-00711C90E4CB}" WebPart="true"  id="g_ac7575c2_666c_4729_b0a2_00711c90e4cb" AllowConnect="False" AllowZoneChange="False" AllowHide="False" AllowMinimize="False" AllowEdit="False" AllowClose="False" ChromeType="None"></CustomContainer:MyVisualWebPart>
Arsalan Adam Khatri
  • 14.5k
  • 3
  • 37
  • 59