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


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

TransactionAutoComplete = true

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :WCF
 
Is there a way to provide list of exceptions for which transaction should be completed or roll backed, either ways. I have a queue service which I want to remove message in case of certain exceptions (for example database exceptions) and leave it on queue for others (for instance network related issues). I don't want a big list of catch blocks in my code. Thanks -= JL =-


View Complete Post


More Related Resource Links

FormView KeepInEditMode=true isn't retaining values

  


I have an "Edit Page" in my application. It uses a FormView bound to an EntityDataSource.

I have a handler setup for the FormView OnItemUpdated event. If an exception occurs (such as foreign key constraints or non date vales entered in a date colum, etc.), then I set the "KeepInEditMode=true". This is SUPPOSED to retain the user entered values on all of the text boxes instead of rebinding the FormView to the data again and clearing those text boxes. (Right?)

Well, it isn't working...

I have stepped through the code via the debugger and the "KeepInEditMode" does get set to true, but as soon as the page reloads, the values revert back to the original database values (the data is being rebound).

I should also mention that I am setting "ExceptionHandled" to true. I am doing this because I am handling the Exception by displaying an error in a specific area of the page and if I dont mark it as handled, IE generates an Exception popup.

Any ideas?
 


Error "user does not have permission to perform this operation" with User Instance = True.

  

I setup SQL Server 2005 / SQL Express. All works fine in SQL Server 2005.

I am connecting to a SQL Database from VS 2005,  Tools/Connect to Database. I set the Data Source to "Microsoft SQL Server Database File (SqlClient)" (meaning SQL Server Express) and User Instance = True, and Integrated Security = True.

The above is working successfully on all machines except my Laptop. On my Laptop, I am getting this error "user does not have permission to perform this operation". On my Laptop, if I change User Instance = False, it works fine. Also, If I connect to SQL Server 2005 it works fine only if User Instance = False.

I tried all kind of security changes, nothing worked. For example, I setup Everyone as Full Control for the Folder and the MDF File of SQL Server. I gave my user ID as sysadmin role in SQL Server Express. Also, I enabled creating User Instance form SQL Server Express, Nothing is working.

Appreciate your help.

Tarek.


How To Access Datakeys In Javascript...and How To make gridview Column Visible true in javascript

  

How To Access Gridview's Datakeys In Javascript...and How To make gridview Column Visible true in javascript



Reply me..


Menu doesn't popup when WIndow style set to AllowsTransparency="True" WindowStyle="None"

  
Hi,I'm facing an issue, when using Window style set to AllowsTransparency="True" WindowStyle="None", my menus in menubar doesn't popup, rather they gets hidden (not visible) and if you just click by guess then menu item will be executed, its just that menu item is not shown visisble.However, if I revert back the Window style to normal without Transparency then menus visible(popup) perfectly.I'm not sure what could be an issue?San

How to Consume (Cookieless =true) Session Enabled Web services

  
  Hi, I need to use cookieless=true in web.config and enablesession=true in web methods.   I've two web methods like, [WebMethod(EnableSession=true)] public void SetName(string Name) { Session["Name"] =Name; } [WebMethod(EnableSession=true)} public string GetName() { return (string)Session["Name"] }   In my aspx.cs, using proxy I want to call SetName in button 1 click, and retrieve the name (which i put it into web service session on button 1 click ) in button 2 click like,   protected void Button1_Click(sender o, eventargs e) { webserviceproxy proxy =new webserviceproxy(); proxy.SetName("Prabhu"); } protected void Button2_Click(sender o, eventargs e) { webserviceproxy proxy =new webserviceproxy(); Response.Write( proxy.GetName()); } Here, How can I use cookie container and how can i achieve what Im expecting to do?   Please help me on this. thanks Prabhu P Work Smart, Not Hard

How can I show INSTEAD OF in XML output?

  
I am trying to create an XML document as the result of queries against our database tables. In some cases I need fields (usually INT) to display as <FieldName xsi:nil ="true" /> and that seems to work just fine if I used "ELEMENTS XSINIL"   However, I need to be able to chose (basically on a field by field basis in my SELECT statements) to return a blank field when the database holds a NULL value such as: <FieldName></FieldName>  (Or <FieldName/> either way would be fine).   How can I do that? Thank you for your help!   SELECT RecordCode, FieldToBeBlank, [Year] , [Month] FROM dbo.SomeTable FOR XML PATH('CustomRootName'), ELEMENTS XSINIL

Error "user does not have permission to perform this operation" with User Instance = True.

  
I setup SQL Server 2005 / SQL Express. All works fine in SQL Server 2005. I am connecting to a SQL Database from VS 2005,  Tools/Connect to Database. I set the Data Source to "Microsoft SQL Server Database File (SqlClient)" (meaning SQL Server Express) and User Instance = True, and Integrated Security = True. I am using Windows Authentication mode in SQL Server Express. The above is working successfully on all machines except my Laptop. On my Laptop, I am getting this error "user does not have permission to perform this operation". On my Laptop, if I change User Instance = False, it works fine. Also, If I connect to SQL Server 2005 it works fine only if User Instance = False. I tried all kind of security changes, nothing worked. For example, I setup Everyone as Full Control for the Folder and the MDF File of SQL Server. I gave my user ID as sysadmin role in SQL Server Express. Also, I enabled creating User Instance form SQL Server Express, Nothing is working. I am already added to the Administrator Group locally on my Laptop. Still same problem. Checked this article: http://msdn.microsoft.com/en-us/library/ms254504.aspx, same problem. I enabled User Instances and also tried to Disable User Instances. When I disable user instances, and then try to connect from VS, I get a different error, which is asking to enable user instances.

Values in user control fields empty when AutoEventWireup=true ?

  
As a BizTalk developer I'm trying to build a ASP.NET website so some obvious things might be new to me (so please be gentle). I have a web form and I have a user control on it. This user control contains a panel with some user properties that are to be stored in a database. So far nothing fancy. The user control itself contains a panel and is working fine (all code to retrieve and store the values is working). I used the default settings of creating a user control and one of them was AutoEventWireup=true. This works fine because I also have some dropdown boxes (and other fields) that need to be filled with values from the database and that happens in the Page_load event. The panel specifies the 'DefaultButton' which calls a method when clicked to save the values after the user has changed them. On this click the code of the method is called, I confirmed that, but I found out that the values of my controls on the user control (for example the Textbox control) are empty. As a non-ASP.NET developer I couldn't figure out why. So I changed some settings like AutoEventWireup to false. Off course this resulted in my dropdown boxes no longer to be initially filled, but my surprise was big to find out my controls actually contained the values the user typed in. Logically I need both the values and th

radiobutton list item make visible true or false in javascript

  
in my project i have used one radiobuttonlist according different user login , i want to make one of radiobuttonlist item visible true or false..   please help me to solve this issue.   thanks in advance.  

Behaviour of WPF ComboBox with IsTextSearchEnabled=true and isEditable=true is not quite understanda

  
Hi, imagine you have a ComboBox with the following entries in the DropDown list: 1, 5, 10, 15 Now follow up this scenario: - open DropDown list - type 13 in the edit field -> 10 is selected in DropDown list - press "Enter" As result DropDown list is closed and 10 is placed in the edit field. How to override this behaviour so that 13 would be not overwritten after pressing "Enter"? Regards Efim

collapsiblepanelextender Collapsed="true"

  
I have a drop down list, that when a value is selected a collapsible panel extender opens. If the drop down value is not selected, the collapsible panel extender closes.My drop down list and collapsible panel extender are inside an InsertItemTemplate of a FormView. I use javascript to open and close the collapsible panel extender.However, when I set the Collapsed="true" to the collapsible panel extender (as I want the collapsible panel extender closed when the InsertItemTemplate of the FormView opens), the Collapsed="true" appears to override the ability of the collapsible panel extender to open or close. Hence, the collapsible panel extender does not open. I have tried setting the Collapsed="true" server side and client side, but I cannot get the javascript to work when I try to use the Collapsed="true". I have also attempted using the BehaviourID of the collapsible panel extender, but to no avail.Can any one help me to get this working?Here is my code (cut down): My Panel & Collapsible Panel Extender Controls:<asp:Panel ID="PanelAchievementOwnHeadingInsertItem" CssClass="noFlickering" runat="server"> ........... </asp:Panel> <cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtenderAchievementOwnHeadingInsert" Collapsed="true" CollapsedSize="0"

Medium Trust and OleDbPermission unrestricted=true

  
 Hi,can anybody enlighten me what holes i punch when i extend the medium trust policies with OleDbPermission unrestricted=true?I want to read Excel files and need to change "Data Source" and "ExtendedParameters", so i do not want to restrict things further. Is it possible to access devices, services or files outside the web application root with this configuration?   Thanks     (mk)

Not able to save checkbox values as TRUE on record creation

  
I have a form I created in InfoPath 2010 on a SharePoint 2010 list. As part of this list, there are 6 yes/no columns.  Each yes/no column I have bound to a different checkbox in the InfoPath form.  In SharePoint, when I view the list and click "add new item", the blank InfoPath form appears, I edit the form and submit it.  All works fine.... EXCEPT the checkboxes.  It seems that the checkboxes always save as FALSE the first time I save a new record. If I save the new record, and then choose to "edit the item", I can set any or all of the checkboxes to true, and it works fine.  But on the initial creation of the record (using InfoPath), the checkboxes always end up being persisted as FALSE. If I create a new record directly in the list (using the datasheet view), I am able to save the yes/no fields as YES, and they persist.  So the problem really does seem to point to the InfoPath form. Any thoughts on how I can persist a TRUE value for these checkboxes when saving for the first time?

What is difference between Panel's Visible-True/False and Setting Multiview's ActiveViewIndex ?

  
Hi, I have a panel that contains several controls. On the other hand i have a MultiView that contains Several view that in turn itself contains several controls . In multiview we have to set ActiveViewIndex for the view which we want to see. That same thing can be done through Panel containing another seleral panel's and setting its Visible property to True/False accordingly. Is seems Multiview  is just using this Visible property internally to render controls .Since other views (whose Index is not set to be active Index) are processed on the server for its Whole life cycle(I am confused here..whether i am right or not) .Same thing perhaps happen when we use a Panel insteed and use Visible=True/False. So, what is the difference between MultiView and Panel taking this scenario ?

Error: PrepareForSerialization can only be called when IsPersistable is true.

  
I'm using a workflow service and at the end of a TransactionScope activity, the workflow abort:  "An error processing the current work item has caused the workflow to abort.  See the inner exception for details." The inner exception is: PrepareForSerialization can only be called when IsPersistable is true.      

MaintainScrollPositionOnPostback = true is not working in IIS 6 with virtual directory is running A

  
Hi All, virtual directory is running ASP.NET 2.0.50727 Environment details: IIS 6 on Win Server 2003 The virtual directory is running ASP.NET 2.0.50727 I have set maintainScrollPositionOnPostBack="True" in the page directive Any ideas? Do I need to install any service packs? also the app is not working well with firefox in some scenarios

Sharepoint DateTimeControl in Firefox shows additional "true" text

  
Hello, we have problem with sharepoint DateTimeControl in firefox. Basically it works almost perfect, but there is one issue: after selecting date in popup calendar, additional "true" text appears below the control. You can see it here . We need to click one more time the calendar icon to make it disappear. How to solve this problem?
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