Skip to main content
added 794 characters in body
Source Link
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>

UPDATE

No what I mean was, you can drop visual web part using SharePoint Designer and once it includes the Register directive and your web part control on the page.. You can copy these into your application page in Visual Studio..

About everything works fine when Visual Studio is in Debugging Mode.. That's because when you stop debugging, Visual studio retracts your solution.. And thus you don't have Visual Web Part in your farm, what you can try is Right Click the Project -> Click Deploy.. This will include your solution and activate the features.. when you build your solution and deploy it, it generates a WSP file in Debug folder which you can use to deploy the solution without using Visual Studio.. using Add-SPSolution and Install-SPSolution Powershell commands..

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>

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>

UPDATE

No what I mean was, you can drop visual web part using SharePoint Designer and once it includes the Register directive and your web part control on the page.. You can copy these into your application page in Visual Studio..

About everything works fine when Visual Studio is in Debugging Mode.. That's because when you stop debugging, Visual studio retracts your solution.. And thus you don't have Visual Web Part in your farm, what you can try is Right Click the Project -> Click Deploy.. This will include your solution and activate the features.. when you build your solution and deploy it, it generates a WSP file in Debug folder which you can use to deploy the solution without using Visual Studio.. using Add-SPSolution and Install-SPSolution Powershell commands..

added 930 characters in body
Source Link
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>

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.

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>
Source Link
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.