asp.net

Is it possible to return an ASP page before continuing slow server side work (eg logging)

Is it possible to return the page response to the user, before you've finished all your server side work? Ie, I've got a cheap hosting account with No database, but I'd like to log a certain event, by calling a webservice on my other, more expensive hosting account (ie, a very slow logging operation) I don't really want the user to hav...

Allowing user to download from my site through Response.WriteFile()

I am trying to programatically download a file through clicking a link, on my site (it's a .doc file sitting on my web server). This is my code: string File = Server.MapPath(@"filename.doc"); string FileName = "filename.doc"; if (System.IO.File.Exists(FileName)) { FileInfo fileInfo = new FileInfo(File); long Length = fileInfo....

Beginning ASP.NET, here are my novice questions

I'm a .NET desktop developer, I know WinForms, WPF, C#... I want to learn about web development. I know XHTML, CSS, Javascript. I started learning PHP but I prefer C#. That's because I thought about learning ASP.NET to take the advantage of my .NET knowledge. Where to start? Plain ASP.NET first? ASP.NET MVC? What about ASP.NET AJAX? I...

Why are image acting as downloads?

I am using C# ASP.NET. I generate user friendly image names and use rewrite to find the correct image name. Normally in firefox when i right click an image and hit view image i get the image in my browser. However these images are acting like downloads, why? global.asax: void Application_BeginRequest(Object sender, EventArgs e) ...

How do i (url) rewrite without clobbering the mime?

I have a url similar to /abc/1.png i then rewrite it to /full/path/1.png. However it seems like the mime is being clobbered because when hitting view image with firefox i get a download instead of a page with the image. How do i solve this? I am using C# and ASP.NET you can view this post for more details http://stackoverflow.com/questio...

Drag and drop in ASP.NET

I need to create a new application in which the UI designer decided to heavily use drag and drop. Some of the drag and drop functionality would be: Moving items within a list Moving items to a trash can to delete them Possibly letting users have a "My Page" where users would use widgets to create a personalized page As soon as the us...

asp.net and jQuery problem: Client elements don't get updated when the form is posted back

I have a web form that contains lots of JavaScript functionalities to manipulate the DOM. This is achieved using AJAX to call a service that will return me whatever I have to do, such as hiding elements, cascading drop downs, removing and inserting new items to a select, etc. Everything works as expected apart from one particular functi...

ASP.NET, Showing Loading message while Postback

I have an ASP.NET page which has an asp.net button control in it. When the user clicks on the button, the page will do some calculations and then close itself, but when I click on the button during post back, the page shows a blank screen. I want to show a loading message instead of this. I used javascript to show a div which was hidd...

how to set Page.IsValid in asp.net

If the page class property IsValid is read only, how can I set it using my own validation method? So far all I've been able to do is set this property by calling Page.Validate(). How can I write my own functionality that will change the IsValid property just like Page.Validate() ?? thanks ...

Can an assembly in an ASP.NET Bin folder automatically register HTTP handlers?

Is it possible for a .NET assembly in an ASP.NET web site's Bin folder to automatically respond to certain incoming HTTP requests, as if it had an httpHandlers entry in the web site's web.config file, but without actually having to add that entry? For example an assembly may contain the following metadata to get some embedded static res...

I need some clarification on the MVC architecture and the three-tier architecture...

Hi, I've been reading the book Pro ASP NET MVC Framework and I'm getting really confused with a lot of things. I've been trying to do some research but I'm finding that with so many different approaches and concepts being thrown at me, it's just making things worse.So I have a few questions: I know MVC is supposed to split the functio...

ASP.NET : Form posting via jQuery

I have an ASP.NET page with 2 ASP.NET text boxes and one ASP.NET drop downlist I want toi use jQuery form posting instead of normal ASP.NET post back.Can anyone guide me how to do this ? How can i access the server side controls in the action page ? I dont want to pass everything via query string. Kindly guide me how to go ahead ? Thanks...

How to implement copy protection in website product?

My company has a website product (ASP.NET) which is sold to customers. It means we don't host the website. They install it on their server and run it in the intranet. I need to implement some sort of copy protection mechanism so that not everyone ends up installing the website. It has following aspects: It has to be completely softwar...

Comparison between subsonic and ADO.NET Entity Framework which one is faster

I am very confused with the use subsonic or ado.net entity framework Which one I should pefer? I creating a web site using asp.net mvc and all i need is greater performance and I also want to save time using ORM. So Which orm i should use? ...

how to use executecommand() to dynamically insert rows into database without calling submit changes in mvc, linq, vb

how i can insert a table from one datacontext say table1 to be inserted into other datacontext using linq in mvc without using insertonsubmit(). my user code is following Public Class PayController Inherits System.Web.Mvc.Controller ' ' GET: /Pay/ Private t As New PayRollMVC.DataContext1() Private c As New PayRollMVC.DataContext2(...

Using JQuery in a Subfolder When the MasterPage is in the Root Folder.

I am trying to use the jquery library in ASP.NET in a subfolder called "samples" with a masterpage that is located in the root directory. Presently the references to the jquery scripts are located in the head tag of the master page. If the page I am creating is also in the root directory, everything works fine. If I move the page to the ...

How can I configure ASP.Net membership providers through code?

We're using ASP.Net membership providers (the SQL Server provider), and I want to be able to set up an Admin user account as part of our installer. To do this, I need the ASP.Net membership provider configured so that my installer can use it - but I don't want to have to set up a config file for the installer. So is there a way of confi...

Empty rows in data repeater

I have a page when creates a new order of which you can add multiple line items. A line item is a contained user control with 4 input fields. when the user fills in the line items they can click a link button which will add a new line item to the "repeater" its only when they click save order (saving the order header and all line items i...

ContentType doesnt work, mime=application/octet-stream

In C# i am doing context.Response.ContentType = "image/png"; context.RewritePath(sz); context.Response.ContentType = "image/png"; It seems to redirect the path as i can see see images on my pages. However in firefox when i right click and select "view image" i get a download. Using this c++ code i c...

ADO.NET Entity Framework does not allow gridview clicking sort columns?

I am using the ADO.NET Entity Framework data model. I send data from SQL to a GridView via ADO.NET Entity Framework. But how can i sort gridview'columns click if i use EF ...