Questions tagged [visual-web-part]

Visual Web Part is a Web Part built using a User Control (.ascx)

453 questions
3
votes
3 answers

How to create and write XML file in SharePoint /_layout folder using visual studio(programmatically)?

How to create and write XML file in below URL using visual studio(programmatically). web.Url + "/_layouts/MyPoject/Generated.xml" I want to generate XML programatically inside MyProject Folder. Once it generate, how to write into that XML?
Hitesh Chandegara
  • 2,638
  • 6
  • 29
  • 49
1
vote
3 answers

Storing WebPart property per user who does not have enough privileges

I am implementing a webpart, where user can change some information of the webpart itself. I store this information in webpart property. [WebBrowsable] [WebDisplayName("Group name")] [Category("MyWebpart")] …
Tschareck
  • 2,155
  • 7
  • 35
  • 52
1
vote
2 answers

Send alert notification when particular field is changed

How to programatically send alert notification to a particular user when a particular field has been changed?
Hitesh Chandegara
  • 2,638
  • 6
  • 29
  • 49
1
vote
0 answers

Getting exception while save linq query result into ViewState

Following is the code SPList splist = web.Lists["MyList"]; var query = from SPListItem oItem in splist.Items.OfType() where !Convert.ToString(oItem["Status"]).Equals("Completed") …
Hitesh Chandegara
  • 2,638
  • 6
  • 29
  • 49
1
vote
1 answer

How can I extract the functionality of a OOB Web Part?

OK, this is my question... I need to extract the functionality of the My Links web part and later use it in a new custom web part. If you know how can I do, just say it. Regards.
1
vote
4 answers

Dynamic button not firing its event

I am hoping that someone can help with the following scenario. Basically the error I am getting is that when I click on my dynamicly created button it is not firing its corresponding function. The scenario is as follows. It is a visual webpart,…
Sonja
  • 11
  • 3
1
vote
0 answers

GridView1_RowEditing is being called instead of calling GridView1_RowUpdating

i have a simplest code..and its working fine if I run it as just Dotnet simple webpage. but when i use this code in VisualWebPart it react in other way.. the problem is... I m making CRUD operation on GridView when I am clicking on Update button it…
dpk
  • 45
  • 1
  • 7
0
votes
1 answer

Prevent duplicate insert on refresh without session?

I'm working on SharePoint 2010 (using a visual web part). Is there any way to prevent duplicate inserts in a list when a page is refreshed using F5, without using session?
Mahmoud
  • 185
  • 1
  • 3
  • 11
0
votes
2 answers

Add newuser with roles to spgroup

i want to add a user to a spgroup with specified roles can any one help to write the code in visual webpart? thanks Naveen
Naveen
  • 1
  • 1
0
votes
1 answer

Sharepoint 2010 Visual WebPart and LinqDataSource

How do I use Linq DataSource in a SharePoint 2010 Visual Web-part. When I type
Agamand The True
  • 875
  • 3
  • 17
  • 33
0
votes
2 answers

Site not shared message after visual web part click

I have created a Visual Web Part. Inside, there is submit button that on click runs some code. It works fine with my Site Collection Administrator. but it doesn't work with my test user. This test user has read permissions only on the site. When I…
Gyonder
  • 1,183
  • 3
  • 28
  • 49
0
votes
1 answer

On adding a visual web part I get this error "Key cannot be null. Parameter name: key"

I've created a SharePoint 2010 Visual Web Part project. Added some html to the ascx file and deployed it. When I try to add it to my page I get this error - Key cannot be null. Parameter name: key <%@ Assembly…
gotsp
  • 959
  • 8
  • 20
  • 31
0
votes
1 answer

Set diffrent value for Sharepoint custom property of same web part in multiple diffrent pages

I have visual web part and i am attempting to set custom property unique value on each pages. For example i have two aspx pages. Deal.aspx and Fund.aspx. Both page is having same web part used. When i set the value custom property in web part of…
Savan Patel
  • 105
  • 1
0
votes
0 answers

Please wait message while page with visual webpart is loading

I have a page which consists of a Visual webpart. The user goes to the page by clicking on the Sharepoint default side nav. The page I mentioned earlier takes a while to load and I would like to have a "page is loading" message to be displayed while…
user25284
-1
votes
1 answer

may i know how to use list field iterator ?will u pls give one scenario?

I want to know the purpose of list view iterator and need to use in my current project.will u please brief on this. I have some 20 fields in visual webpart by using asp.net controls but as per the requirement I need to change those controls with…