.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

Row not found or changed. Only when field is changed to something else then 0.

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :ASP.Net
For our ASP.NET project for school we had to build a sport event management web application.We provide the application in three languages (English, Dutch & French) which you can switch all the time. This has worked all the time for all users, well that's what we think anyway.Yesterday I found out that switching from one to another language isn't working for 2 of our users. So I started testing a bit and I always got this error.I'll try to explain what happens behind the doors when changing the language:First of all the current language is saved in a session so we don't have to check the user row every time a page loads. Besides that we save the language in the users row in the database.Users Table:Id int Unchecked Email varchar(150) Unchecked FirstName varchar(100) Unchecked Password varchar(50) Unchecked Telephone varchar(25) Checked Mobile varchar(25) Checked Address varchar(150) Checked Name varchar(100) Unchecked PostalCode varchar(20) Checked Culture smallint Checked PostalName varchar(100) CheckedId int UncheckedEmail varchar(150) UncheckedFirstName varchar(100) UncheckedPassword varchar(50) UncheckedTelephone varchar(25) CheckedMobile varchar(25) CheckedAddress varchar(150) CheckedName varchar(100) UncheckedPostalCode varchar(20) CheckedCulture smallint CheckedPostalName varchar(100) CheckedI've marked the field I'm talking about in bold. If f

View Complete Post

More Related Resource Links

Row not found or changed


The following references to user controls give the error "Row not found or changed." However, when I remove any one of the references, the results are perfect and everything displays fine. Any ideas why?

    <div class="content-left">
        <Prf:gradyr ID="GradYrE" GradYr='<%#Bind("GradYr")%>' runat="server" />
        <Prf:names ID="NamesE" FirstName='<%#Bind("FirstName")%>' LastName='<%#Bind("LastName")%>'
            runat="server" />
        <Prf:email ID="EmailE" _Mail='<%#Bind("Email")%>' _Mail_Disp='<%#Bind("Email_Disp")%>'
            runat="server" />
        <Prf:phones ID="PhonesE" Phone='<%#Bind("Phone")%>' Phone_Disp='<%#Bind("Phone_Disp")%>'
            Cell='<%#Bind("Cell")%>' Cell_Disp='<%#Bind("Cell_Disp")%>' runat="server" />
        <Prf:gender ID="GenderE" Gender='<%#Bind("Gender")%>' runat="server" />
        <Prf:maiden ID="MaidenE" Maiden='<%#Bind("MaidenName")

Flag Field After Digitial Signature Changed Event


I'm sorry if this has been answered before, but please let me know where I can find the answer.

I am trying to change a field after a signature is added to a form.

Getting: "InvalidOperationException was unhandled by user code", "Operation is not valid, because of the current state of the object."


public void InternalStartup()


   EventManager.XmlEvents["/my:myFields/my:signatures1/my:signatures2"].Changed += new XmlChangedEventHandler(signatures2_Changed);


  public void signatures2_Changed(object sender, XmlEventArgs e)


   // Write your code here to change the main data source.

   XPathNavigator xnDoc = this.MainDataSource.CreateNavigator();

   // MessageBox.Show(xnDoc.OuterXml.ToString(), "Main Data Source XML");   

   XPathNavigator field1 = xnDoc.SelectSingleNode("/my:myFields/my:field1", this.NamespaceManager);


Blog Site Lookup Field Changed List Reference


We have a OOB blog site that was working fine until last week. Overnight, the Category lookup field in the Posts list began referencing the Category list from another blog on a different, unrelated sub site. I'll try to illustrate the structure below.

Top Site
	Site A
		Sub Site A-1
			Sub Site A-1-1 (Blog 1)
	Site B
		Sub Site B-1 (Blog 2)

The Posts list in Blog 1 has a lookup field for Category, which now references the Category list from Blog 2--it should reference the Category list from Blog 1.

I came up with a solution to save the site as a template, alter the reference GUID in the manifest.xml, and then re-launch the site. However, this is not a perfect solution because:

  • Upon re-launch of the blog site, all comments and posts lose the previous Created and Modified By information and instead point to my account because I loaded the site. The only way I can think to circumvent this issue would be to modify the list reference while the site is still live, but I'm not sure how to do that.
  • I still don't know how this problem happened and how to avoid it in the future.

I've been researching the problem for several days and I can't find any rhyme or reason for how it may have occurred. I was hoping the community might have some ideas for me

Setting size of Grid Since Ajax Resizer Changed It


I'm sure that wasn't a very good subject, but I couldn't think of a better one. What I have is a page that has an UpdatePanel on it with a GridView control in it. It was originally displaying at a particular height and width according to the CSS style I have setup for it in my style sheet. However, since adding an AJAX Resizer control to the UpdatePanel, it is now defaulting to a much smaller size.

How do I get the grid to default to that same height and width that is in its CSS class? I don't mind putting it in the ASPX page or whatever, just need the grid to default to a larger size than the small little box it defaults to since adding the AJAX resizer. 

output cache to be used only when parameter has changed + old question of user control not answered



i have 2 questions about output cache:

1.is it just me , or does it seems that it is used only after the second time that the user reaches the webpage? if so, why, and how can i tweak it to my needs? my guess is that it wouldn't be logical to cache every time a user reach a webpage, but only when it happens enough times.

2.i know that i can use "varybyparam" for using the output cache when the parameter doesn't change , but it seems that it would use the output cache even if there is no parameter , or if the specified paramter is not there. is there a way to overcome this?

3.an old question that somehow marked as "answered" , yet i didn't solve : suppose i created a user control and i gave it values through the CTOR via the aspx file . is it possible to show the values from within the split/design mode? remember that i've talking about ASP.NET and not simply C# winforms . i write this because this question was on :


and the answer that i got was for C# and winforms . i've tried to do the same for ASP.NET , but i've failed.

can anyone please help me?

SQLCMD: supress "Changed database context to . . ."

Product:  2008 SQL Server Standard Edition. Shell:     SQLCMD (i.e. sqlcmd -i"test.sql")Script (test.sql):   use Master;   print $(SQLCMDERRORLEVEL)The screen output is always:   Changed database context to 'Master'   0However I want the above output to be (only):   0I have tried calling SQLCMD with the -m command line parameter set to each of the {-m-1, -m 0, -m 1} settings, but none work. I have tried: set SQLCMDERRORLEVEL = each of {-1,0,1,25), but none workAnybody know the secret?Thanks in advance,Jerry

SQLCMD: Changed Database Context messages

Is there a way to suppress the "Changed Database Context to " messages in SQLCMD?  For example, I get the following: 1> use master2> goChanged database context to 'master'.1>I am trying to migrate some legacy batch files that called isql and used the output files.  These extra "Changed Database Context to " messages are causing our scripts to break, and I was hoping to avoid having to write something extra to handle these messages.Thanks.

The subscription status of the object could not be changed

Good day to all.. I have a problem. There are two sql servers with transactional replication Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 <X64> (Build 3790: Service Pack 2) There was a table function without parameters, included in articles of publication. Then I had to change it with adding one parameter. I've changed it via alter function on the publisher. And then replication stopped with error message about invalid argument count in this function. I've decided to reinitialise subscribtion with new snapshot, but new snapshot can't be created ("The subscription status of the object could not be changed"). Then I've decided to drop this subscription and recreate it, but I can't drop it (same error - "The subscription status of the object could not be changed").. Dropping publication also was unsuccesfull. How I can repair replication now?

User ID getting changed

Hi, Scenario - The site users has 2 User Id's with different domain. ie John has Id's Domain1\John and Domain2\John. Statement  - So whenever an user saves a User field in an item with Domain1\John, the item gets saved with Domain2\John, which is wrong. Other Info - (1)When the user saves an item, an eventhandler is fired for setting permissions for users and for initiating a workflow.(2) This issue does not happens in all User fields, it only occurs for those userfields(Approver Userfield) which are used in Workflow as an Approver. The other userfields works fine for all users.(3)This issue does not occur for all, but only for certain users. Please advise on why this problem is occurring. Thank You

WPF - Refreshing Datasource after collection changed

Hi All I have a a couple of business objects, a Market Position (like a holding in Microsoft say) and a Client Collection, which aside from a few other variables will hold in an ObservableCollection(Of FuturesSecurity) a collection of FuturesSecurities positions. Each Client is held in a ObservableCollection(Of Client) and I happily have many clients in this collection. Each Object (Client and FuturesSecurity) both implement INotifyPropertyChanged and I can trace changes in prices right up to the user interface level (proof of life been a msgbox called at that level), however I cannot get this to be reflected in my databinding. Is there a way I can get this to refresh automatically? Shouldnt that be happening with Databinding anyway when the datasource changes? I am currently setting the data source as:     Me.DataContext = Clients Does anyone have anythoughts here? Happy to post more code as neccersary thanks in advance Chris

Could not complete cursor operation because the table schema changed

Microsoft SQL Server  2000 - 8.00.2039 Got this error: Could not complete cursor operation because the table schema changed after the cursor was declared. SQLCode: 16943 SQLState: HY000 Is this a known issue?  I suspect the application logic may cause this error. Please advise. Thanks a lot!  

Infopath Changed Event code triggering in preview but not in web filler.

Hi there, I've written some code for a changed event hookup on a field in infopath 2010. The form is for submission to a sharepoint 2010 forms library. What the code does is fill in a specific value into a field depending on the selected value from a combo-box elsewhere on the form. When i preview this in Infopath 2010 it works perfectly but when i fill out the form through the web interface it simply does nothing. I've got another piece of code which executes on load and this works perfectly in both the preview and the web filler. What it does is just set the value of a field when the form loads. Here is the code, could someone tell me what i'm doing wrong? public void InternalStartup() { EventManager.XmlEvents["/my:myFields/my:service_level"].Changed += new XmlChangedEventHandler(service_level_Changed); EventManager.FormEvents.Loading += new LoadingEventHandler(FormEvents_Loading); } public void service_level_Changed(object sender, XmlEventArgs e) { // Write your code here to change the main data source. XPathNavigator xroot = MainDataSource.CreateNavigator(); XPathNavigator serviceLevel = xroot.SelectSingleNode("/my:myFields/my:service_level",NamespaceManager); XPathNavigator xest = xroot.SelectSingleNode("/my:myFields/my:est_cost", NamespaceManager); switch (serviceLevel.Value)

Using Windows 7 my screen resolution changed.

My screen resolution changed to 1280 X 720.The relavent sreen resolution section in windows only now allows me a max of the above.I am using NVIDIA Ge Force 9800GT graphics and ASUS VW220 monitor.Will appreciate any help.Cheers.    

when webform contents changed, a new IE window opens with new contents. why?

I am implementing a web form, and when a checkbox is clicked, contents of the form are changed (i.e. additional checkboxes are being selected), and webform is refreshed to show the new contents. however, instead of displaying new contents within the original IE window, a new IE window is openned with new contents, and the old window remains there without any content update. i did not request for window.open or provide a _blank to specifically indicate a redirect should go to a new IE window. I just want the original IE window being refreshed to reflect the content changes. i have worked with asp.net for years and i think that be default refresh of the webform to reflect new changes always stay in the same IE window and thus never pay attention on how to open or surppress a new IE window? i think it is some config, but don't know what config and where i should look for it. please help thanks michael huang    

Handle MaxLength changed event for TextBox

Hi, Is it it possible to handle the event when MaxLength property is changed on a TextBox? Thanks, cp

how to stop refresing data grid when selection changed

Hi , I have datagrid on my page bounded with linq datasource. I want to stop refresing datagrid when I need to show details of selected row. Could you please help me to do that. Regards Reside 

Raise OnPropertyChanged event when Text Box Text has changed

Hi there I have a Wrapped Text Box that is bound to a Public String Property. I have a related OK Button that should be Enabled when the text changes to indicate there are 'items' in the Text Box. The problem is that the set accessor of the property (and thus OnPropertyChanged) is not being called until focus is lost from the text box - and I would like the Ok Button to be enabled before then. What is the the best way to raise the set when the Text Box text has changed? (A List Box is not an option) Thanks very much Joe
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