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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Delete not working all the time.

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :ASP.Net
 
From time to time i am getting this error when attempting to delete a file. Exception Details: System.IO.IOException: The process cannot access the file 'D:\gallery\images\Untitled-1.jpg' because it is being used by another process. And the times i see it most is if i upload the image and then within seconds try to delete the image. Is there anything that can be done on my part to help prevent this? 


View Complete Post


More Related Resource Links

update/delete not working on server only

  

my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?

thanks 


Delete not working on List.aspx - out of box

  

Hello,


I'am trying to use Dynamic data web site on my project. I have Visual Studio 2010 enf Framework 4.0. I create the default project with the wizard. I add my own Entity Data Model.

When I try to use the "delete" autogenerated button on List.aspx, on the table ServerSetting (see image below), I receive a null exception.  I have no custom code involved in this operation and cannot seem to determine what is Null.

Any help would be appreciated!



Thanks,




Ben

[NullReferenceException: Object reference not set to an instance of an object.]
   System.Data.Objects.Internal.ForeignKeyFactory.CreateConceptualNullKey(EntityKey originalKey) +30
   System.Data.Objects.DataClasses.EntityReference.NullAllForeignKeys() +722
   System.Data.Objects.EntityEntry.NullAllForeignKeys() +235
   System.Data.Objects.EntityEntry.Delete(Boolean doFixup) +77
   System.Data.Objects.EntityEntry.Delete() +9
   System.Data.Objects.ObjectContext.DeleteObject(Object entity, EntitySet expectedEntitySet) +169
   System.Data.Objects.ObjectContext.DeleteObject

can anyone tell me why setInterval is not working properly i want to display the time every seconds,

  
setInterval is suppose to execute the script every second there getting the most uptodate time of day , but it does not update it stays the same
 
 
<html>
  <body>
    <form>
      <script type="text/JavaScript">
      <!--

          function interval() {
              setInterval("time()", 1000);
          }
          function time() 
          {
              var d = new Date();
              var time = d.getHours();
              var time2 = d.getMinutes();
              var time3 = d.getSeconds();


              document.write(time);
              document.write(" : ");
              document.write(time2);
              document.write(" : ");
              document.write(time3);
              
          }
        
  // -->
      </script>
      <input type="button" OnClick="interval()" value="Click Me!"/>
    </form>
  </body>
</html>


 


"Remember Me Next Time" under Login Control is not working

  
I am using VS 2005 and created a Login control. Login control provides "Remember Me Next Time" check box, I check this box but it does not remember next time. I have following entry in the web.config file <authentication mode="Forms"> <forms name=".MyCookies" loginUrl="login.aspx" protection="All" timeout="5000000" cookieless="UseCookies" slidingExpiration="true" path="\"></forms> </authentication> What am I missing? Thanks

The delete and edit buttons not working in gridview!

  
Hi everyone. I have problem with the buttons Edit and Delete in Gridview for very long time and i really need help about it.  So the when i click edit i get in edit mode and when click update the values in the row i was changing disappear but only in the gridview. When check in the Database nothing happens. The delete button not works at all, i mean when click on it only refresh the table. If see something wrong in my code please help. See how looks my page:Now here's my code in aspx:<%@ Page Language="C#" Title="Specific Search in Phone Directory" ... ... ... <asp:SqlDataSource ID="SqlDataSource7" runat="server" ConnectionString="<%$ ConnectionStrings:ThisIsMyConnection2 %>" OldValuesParameterFormatString="original_{0}" DeleteCommand="DELETE FROM [Resident] WHERE [MobileNum] = @MobileNum" InsertCommand="INSERT INTO [Resident] ([FNAME], [LNAME], [MobileNum], [HomeNum], [OfficeNum], [FaxNum]) VALUES (@FNAME, @LNAME, @MobileNum, @HomeNum, @OfficeNum, @FaxNum)" SelectCommand = "SELECT * FROM [Resident] WHERE (([FNAME] + ' ' + [LNAME] LIKE '%' + @FANDLNAME + '%'))" UpdateCommand=

delete button in datagrid in MVVM not working

  
i have a datagrid. i have added a delete button as data template. but on button click, the event is not firing .  <sdk:DataGrid AutoGenerateColumns="False"                       Height="94"                       HorizontalAlignment="Left"                       Margin="0,53,0,0"                       Name="dataGrid1" VerticalAlignment="Top" Width="560"                       ItemsSource="{Binding SelectedComponentInfo.FilterComponentCriteriaMapping}"                       SelectedItem="{Binding SelectedMappingInfo, Mode=TwoWay}" CanUserReorderColumns="True" CanUserResizeColumns="True" DataContext="{Binding}">    

delete button in datagrid in MVVM not working

  
hi all, i am using VS 2010 with silverlight 4.0. i have a datagrid. i have added a delete button as data template. but on button click, the event is not firing .  <sdk:DataGrid AutoGenerateColumns="False"                       Height="94"                       HorizontalAlignment="Left"                       Margin="0,53,0,0"                       Name="dataGrid1" VerticalAlignment="Top" Width="560"                       ItemsSource="{Binding SelectedComponentInfo.FilterComponentCriteriaMapping}"                       SelectedItem="{Binding SelectedMappingInfo, Mode=TwoWay}" CanUserReorderColumns="True" CanUserResizeColumns="True" DataCon

delete button in datagrid in MVVM not working

  
hi all, i am using VS 2010 with silverlight 4.0. i have a datagrid. i have added a delete button as data template. but on button click, the event is not firing .  <sdk:DataGrid AutoGenerateColumns="False"                       Height="94"                       HorizontalAlignment="Left"                       Margin="0,53,0,0"                       Name="dataGrid1" VerticalAlignment="Top" Width="560"                       ItemsSource="{Binding SelectedComponentInfo.FilterComponentCriteriaMapping}"                       SelectedItem="{Binding SelectedMappingInfo, Mode=TwoWay}" CanUserReorderColumns="True" CanUserResizeColumns="True" DataCon

Gridview Delete not working

  
I just downloaded VS2010 with Framework 4.0.30319 I've bound a gridview control to a datasource, defined the select, insert, and delete SQL statements. Select and insert are working just fine thank you, but when I select the (auto-generated) Delete link, a postback occurs, but the row/record remains in the gridview. I have the one-segment key in the select statement, in an invisible column of the gidview. I've set the DataKeyNames property to this column name (CinID).  The delete query reads - DELETE FROM CallIn WHERE (CinID = Cid) I've defined the parameter Cid as the Gridview.SelectedRow, .SelectedDataKey, .SelectedIndex, and .SelectedValue, all with no joy. I created SUB Gridview.RowCommand put a breakpoint there. e.Command shows "Delete" and e.CommandArgument shows the correct row index (1). I created SUB Girdview.DeletingRow and put a breakpoint there. debug shows .SelectedRow=nothing and .SelectedDataKey=nothing (but I don't know if they *should* show something, since I'm not selecting, but rather deleting the row. The postback occurs (click), the grid refreshes, but nothing happens. I cannot figure out why the clicked-on row does not delete. Any ideas?  

Previous working date - Time dimensions

  

Hi all,

I need an mdx to get the previous working day. 

I`ve got my complete time dimension, including weekends.  Every day member has got a Member Property that says wether it is a working day or not.  See table below.  Then, I need an mdx expression to return the "Prev working Day".  Any idea??

 

 

day of the month IsWorkingDay Prev Working Day
01/09/2010      1

many time manualy delete cokkies from browser how to set they are delete ourself

  

a

many time manualy delete cokkies from browser how to set they are delete ourself


Gridview Delete not working

  

I just downloaded VS2010 with Framework 4.0.30319

I've bound a gridview control to a datasource, defined the select, insert, and delete SQL statements. Select and insert are working just fine thank you, but when I select the (auto-generated) Delete link, a postback occurs, but the row/record remains in the gridview.

I have the one-segment key in the select statement, in an invisible column of the gidview. I've set the DataKeyNames property to this column name (CinID).  The delete query reads -

DELETE FROM CallIn WHERE (CinID = Cid)

I've defined the parameter Cid as the Gridview.SelectedRow, .SelectedDataKey, .SelectedIndex, and .SelectedValue, all with no joy. I created SUB Gridview.RowCommand put a breakpoint there. e.Command shows "Delete" and e.CommandArgument shows the correct row index (1). I created SUB Girdview.DeletingRow and put a breakpoint there. debug shows .SelectedRow=nothing and .SelectedDataKey=nothing (but I don't know if they *should* show something, since I'm not selecting, but rather deleting the row.

The postback occurs (click), the grid refreshes, but nothing happens. I cannot figure out why the clicked-on row does not delete. Any ideas?

It has been suggested that I explicitly set the .Selecte

Delete Not working

  

I'm trying to set up the delete method and i'm getting an error saying


System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  Source=App_Web_musu5yqf
  StackTrace:
       at ASP.views_customer_delete_aspx.__RenderContent2(HtmlTextWriter __w, Control parameterContainer) in c:\Users\Billy\Desktop\MVCMotel\MVCMotel\Views\Customer\Delete.aspx:line 16
       at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
       at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
       at System.Web.UI.Control.Render(HtmlTextWriter writer)
       at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
       at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
       at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
       at ASP.views_shared_site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Users\Billy\Desktop\MVCMotel\MVC

XML with PrimaryKey values to delete rows in database table at a time

  

 Hi,

I'm having a gridview in my aspx page with checkbox, User can select one or more than one record(s) at a time and clicks on delete button, Then i'm constructing an object of my DTO and adding all the checked row's Primary Key (DataKeyNames - GUID's in my case) to a serializable class and generating an XML and sending it as parameter to the Stored Procedure.

My Doubt is, can i bulk delete all the rows from database table those are present in my XML document??

If it works, I can do bulk update with XML only, i already did bulk insertion by generating an XML..

My Another Question is, Will it affect the performance? Each time when i construct an DTO object and adding it to the Generic List??

WHich one is better, I mean ObjectDataSource or SQLDataSource or my XML method??

Can anyone please help me out clarifying my doubts and also XML Delete Query..

 

My XML will be like this

 

<root>

<Customer>

<CustomerID>GUID1</CustomerID>

<CustomerID>GUID2</CustomerID>

<CustomerID>GUID3</CustomerID>

 ...

 ...

</Customer>

</root> 

Will bulk delete happen in the above case?

Thanks,

PAvan


HOTFIX INSTALLER HAS STOPPED WORKING - FOR THE HUNDREDTH TIME!!!

  

I am facing the following error:

"Hotfix installer has stopped working" when i try to install the MS SQL Server 2005 update using Windows Update.

My OS is MS Vista Ultimate version

 

Please help.

 

Thank you

***************


working with 3 dropdownlists at a time

  

i am using 3 dropdownlists namely state, city,zip. Once we select  "state" dropdown list ,that state contained "cityes" are displayed.and "cityes" dropdown list selected that city contained "zip" values are displayed.Once we selected state in state dropdownlist,that state contained cyties are displayed at cities dropdownlist. then we want to select another state again we select another state at that time state dropdown box display doplicate values. The duplicate values are comming in run time. how will over come from this duplicated values in drop down list. please help me...


Workflow 'Delete Item' not working

  

Hello,

I'm trying to create a workflow in SharePoint Designer that is triggered on file creation in a document library that does some validation on the file name and would delete the file if it doesn't pass validation. We're using SharePoint Foundation.

I've tried deleting items without any of the other logic of the workflow in place (simply delete every file that is uploaded) but I've been getting the message "Error Occurred - The workflow could not delete the list item. Make sure the list exists and the user has permissions to delete items in the list" every time and had no success so far.

The SharePoint System Account and my own user have full control of the library (as well as site and site collection), and I have tried running the workflow with an impersonation step as well as just the normal setup. I can copy the current item to another library but again no luck deleting it. I've also tried deleting an already existing file in the same library when another file is uploaded in case it was file lock type thing, but that doesn't work either.

I'm wondering if this is a permissions issue somewhere in Central Admin, but any help would be greatly appreciated. Thanks very much.


Categories: 
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