I've read this thread for WCF has inbuilt Custom Fault codes and stuff.
But what is the best practice for ASP.Net web services. Do I throw exceptions and let the client handle the exception or send Error code (success, failure etc) that the client would rely upon to do it's processing.
Update: Just to discuss further in case of SOAP, l...
What is your way of passing data to Master Page (using ASP.NET MVC) without breaking MVC rules?
Personally, I prefer to code abstract controller (base controller) or base class which is passed to all views.
...
Problem
My current project requires me to do different things based on different HTTP request headers for nearly every action.
Currently, I have one massive Controller (all for the same resource type), and every action method has an ActionName attribute (so that I can have multiple versions of the same action that takes the same parame...
Hi,
ASP.NET 1.1 - I have a datagrid on an aspx page that is databound and displays a value within a textbox. The user is able to change this value, then click on a button where the code behind basically iterates through each DataGridItem in the grid, does a FindControl for the ID of the textbox then assigns the .Text value to a variable...
What is the difference between publishing a website with visual studio and just copying the files over to the server? Is the only difference that the publish files are pre-compiled?
...
Oracle 11g version of ODP.Net introduces the provider model objects (session state provider, identity provider etc) which lets the application to store these information in an oracle DB without writing custom provider implementation.
Has anyone has done any performance benchmarking on these objects? how do they compare in performance to...
I've written a control that inherits from the System.Web.UI.WebControls.DropDownList and so I don't have any code in front for this control, but I still want to set the OutputCache directive. I there any way to set this in the C# code, say with an attribute or something like that?
I'm particularly hoping to be able to replicate the V...
I am looking for a best practice for End to End Authentication for internal Web Applications to the Database layer.
The most common scenario I have seen is to use a single SQL account with the permissions set to what is required by the application. This account is used by all application calls. Then when people require access over the...
For example, if I have a page located in Views/Home/Index.aspx and a javascript file located in Views/Home/Index.js, how do you reference this on the aspx page?
The example below doesn't work even though the compiler says the path is correct
<script src="Index.js" type="text/javascript"></script>
The exact same issue has been posted ...
Does anyone know much about the Asp.Net webconfig element ?
I'm looking at it because I'm implementing an MS Ajax updatepanel in an existing site,
and after doing some looking around, on the web I'm not finding a lot of info about it.
And to avoid the flood of replies telling me how inefficient the update panel is, and that it's not a...
I have a asp:menu object which I set up to use a SiteMapDataSource but everytime I try to run the site, I get a yellow screen from firefox saying it cannot find the web.sitemap. Here's the code for the sitemapdatasource and the menu. The Web.sitemap file is sitting in the root directory of the website.
<div>
<asp:Menu ID="MainMe...
Hi,
This is somewhat similar to this question.
However, rather than wanting to hide a column all together, I am just looking to hide the column on the List.aspx page.
My specific example is that fields that are long (or at least nvarchar(MAX)) automatically hide from the List.aspx page as is but are still visible on the Edit.aspx page...
How do I preview a url using ajax? I have seen this done with search engine plug ins and would like to learn how to do this. Specifically, I would like to be able to mouse over a link and see the preview of the webpage using ajax.
...
I have a simple asp:menu item that uses the Web.sitemap to get the menu items. The page will postback but fails to get the page associated to the clicked item. I will mention that the navigation bar code is within the masterpage file.
<div>
<asp:SiteMapDataSource ID="SiteMapDataSource1" ShowStartingNode="false" runat="server" /...
I am using httpresponse.Transmitfile to download files. If I, in the file download dialog, choose to save in a different folder than the suggested one, the download rate drops down to 10 - 20 kb. If I cancel, or always choose to download in the same folder, then transfer rate are 200 kb and more. Here are my code :
procedure TDefault.L...
RPO 1.0 (Runtime Page Optimizer) is a recently (today?) released component for ASP and Sharepoint that compresses, combines and minifies (I can’t believe that is a real word) Javascript, CSS and other things.
What is interesting is that it was developed for ActionThis.com a NZ shop that saw at TechEd last year. They built a site that q...
Hello, I just want an ASP.NET DropDownList with no selected item. Setting SelectedIndex to -1 is of no avail, so far. I am using Framework 3.5 with AJAX, i.e. this DropDownList is within an UpdatePanel.
Here is what I am doing:
protected void Page_Load (object sender, EventArgs e)
{
this.myDropDownList.SelectedIndex = -1;
...
How do people usually detect mime type once file uploaded using asp.net?
...
I have an asp.NET webapplication running in our datacenter in which we want the customer to logon with single sign-on. This would be very easy if we could use the IIS integrated security. However we can't do this. We don't have a trust to the domain controller of the customer. ANd we want to website to be available to the general intern...
I cannot find an elegant way to get the return value from a stored procedure when using TableAdapters.
It appears the TableAdapter does not support SQL stored procedure return values when using a non-scalar stored procedure call. You'd expect the return value from the auto-generated function would be the return value from the stored pro...