.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

using CDATA to delete items

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :SharePoint
Hi, I'm trying to use CDATA to mimic the contextual menu on sharepoint item, and I'm stuck in the delete process.  Can anyone tell me what's wrong with my delete URL call? (keep getting "Action cannot be completed" Error!) Thanks <HTML><![CDATA[<select  name="menu" onChange="location=this.options[this.selectedIndex].value;"> <option value="/sites/template/_vti_bin/owssvr.dll?CS=65001&Cmd=Delete&List=]]></HTML><ListProperty Select="Name" /><HTML><![CDATA[&ID=]]></HTML><Field Name="ID" /><HTML><![CDATA[&owsfileref=]]></HTML><Field Name="FileRef" /><HTML><![CDATA[&NextUsing=]]></HTML><Field Name="ows_Url" /><HTML><![CDATA[">Delete</option> </select></form>]]></HTML>

View Complete Post

More Related Resource Links

Delete list items en masse?

Is there a way to delete list items en masse from a SP list?  I am on MOSS 2007.  In order to use a particular site as a site template I had to save with content and I don't want the content.

How to properly configure permissions so users can view, add, edit, and delete list items, but not w

I am trying to figure out how to properly setup security so that it can be configured at the top-level, and then inherited all the way through. Here is what I would like to do: Each user can view, add, edit, and delete list items - but, users cannot modify or delete web part pages. The only way I know how to do this is set Contribute from the top-down, and then go into each Site Pages library and set Read access. The problem is that I have 100 sites, and I was hoping there was a way I could set security at the top, and inherit downward. Rather than having to go into all 100 Site Pages library and set Read access. Is there a way to do this? Thanks in advance.

How to delete items from datalist.


Hello, i'm using Datalist for to display images from database. I made by this tutorial http://www.aspsnippets.com/Articles/Image-Gallery-using-ASP.Net-DataList-Control-Part-II---Image-Slideshow.aspx. How to delete selected image from sql server?

How to delete custom list items programmatically?


Can anybody tell me how to delete custom list items programmatically?


multiple delete selected ListView items


Hi All

I have multiple delete selected ListView items. If I select last item with any other combination selected items except first item and click delete all items gone. If I didn't select last item or select any other items include first item in that case all selected items deleted like I expected. How to fix that problem?


How to delete a list item in Sharepoint that will also delete sub-items


I have a list of user information and on the DispForm.aspx page, I also have a section to insert sub-items (assets).  I would like to know how to setup a way so that when I delete the main item, it will delete all sub-items as well.  Any information would be greatly appreciated!


Cannot delete list items made prior to a certain date


A few days ago one of our SharePoint designers approached me with a problem with a custom list. He could not delete a certain item from the list. After troubleshooting it for a while, we determined that any list item made prior to 10/31/2010 cannot be deleted. These list items can be edited without trouble. List items created after that date have no problem with deletion. Other custom lists do not exhibit this issue. Also, no configuration changes or updates were made to the server on that date. Our last round of updates happened earlier in the month of October.

I have so far tried rebooting the server and re-indexing the database (only because doing so in QuickBooks seems to fix a lot of issues).

This is SharePoint Server 2007 SP2 Standard on Windows Server 2003 R2 Enterprise with SQL Server 2008 Standard. Everything is in a 32-bit environment. We have ample freespace on all connected drives.

I am fairly new to troubleshooting SharePoint issues, so I'll be frank that I may need some hand holding. Could one of you please offer assistance?

Display data from two lists in a single Data View - how to edit/delete/view items?


I have an aggregate dataview from two lists. (something like this http://office.microsoft.com/en-us/sharepoint-designer-help/display-data-from-multiple-sources-in-a-single-data-view-HA010099144.aspx#BM3)

The problem is, that when I click on "Data view properties", the options in Editing tab (edit link, delete link and view link) are greyed out.

 I'd like to create custom delete/edit/view link for rows in that dataview with linked source. Any idea?

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

jQuery: Styling DropDownList Alternating Items (Rows)

In the following example, I will show how you can style any asp:dropdownlist very easily.

The example demonstrates how you can change alternating row items background color, using the fadeTo() to add a nice touch in the dropdownlist. You can change alt rows with a couple lines.

Hide a repeater in ASP.NET C# if the DataSource contains no items?

I have an ASP.NET page that uses a repeater nested within another repeater to generate a listing of data. It's to the effect of the following:
In the (C#) code-behind I'm basically using LINQ to pull a listing of information from an XML document and bind that information to the first repeater.

Searching for the answer to this, it seems the method is to determine whether the data for the nested repeater is empty. If it is, then you set the visibility of the repeater to false.

Creating SharePoint items with CreateItemActivity

Instead of creating new list items from code in your workflow you can use CreateItemActivity. CreateItemActivity can be used for creating list items or files. Properties of interest for this activity are the following (most of them are self-explanatory):

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

HttpContext.Items and Server.Transfer/Execute

The problem was basically that when a Server.Transfer call was applied the script container (and also various ClientScriptProxy script embedding routines) would potentially fail to load up the specified scripts.

SqlCommand.ExecuteNonQuery() returns -1 when doing Insert / Update / Delete

Sometimes you end up with a return value of -1 when using the SqlClient.SqlCommand.ExecuteNonQuery method.

Why is that?

Well, the ExecuteNonQuery method is there for statements for changing data, ie. DELETE / UPDATE /INSERT, and the returned value are the number of rows affected by that statement.

When checking the documentation we can see that there are some conditions that return -1.

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command.

When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of

rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

ListViewControl - how to group items by their value, for eg. date range



I have a table containing courses, columns are 

Name - "Yoga Classes"

DateStart - "2/23/2010"

DateEnd - "2/24/2010"

I am using ListView Control to bind it, is there a way to display them and group them by Month? 

for eg.


Piano Class (10th Jan 2010 - 11th Jan 2010)
Guitar Class (10th Jan 2010 - 11th Jan 2010)


Yoga Class (15th Feb 2010 - 16th Feb 2010)

Thanks for help.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend