asp.net

How to disable gzip for just one handler .ashx

I am running a website using IIS6 and i wrote a simple generic handler which return smaller images when it receive image url as query string. My problem is that the server is applying gzip to some file types such as .aspx and .ashx. And that made my response image from the handler appear with lower quality because they are compressed. ...

How to run jquery script if html page is the home page... ?

Hello All, I'm working with an external team with our website and they recently added one of my scripts to the .NET MasterPage of the site... well it did finally get my script running but now... it loads Banners on 'every' page on the site. How can I write an 'if' statement that basically says... if this is the home page... run this sc...

i change the codebehind file, nothing happens

In asp.net WebForms I make any changes to aspx.cs file, nothing happens. R# and IntelliSense are not working too on that tab. I even can write 'blablabla' anywhere, it won't cause any errors. Seems like VS just takes the file from some other source, not the project folder, though the "CodeBehind" attribute in .aspx is written ok. I al...

URL Rewrite Outbound Rules IIS7

Experimenting with URL rewrites using this module, however I'm getting the following error when attempting to hit the URL. Looked online for answers, but not sure what the best way to get around this is.... any ideas?? HTTP Error 500.52 - URL Rewrite Module Error. Outbound rewrite rules cannot be applied when the content of the HTTP r...

Resize image on the fly make the image lose quality online but locally works nice

Possible Duplicate: Resize image on the fly make the image lose quality online but locally works nice I wrote this handler to resize images on the fly: Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest 'Read in the image filename to create a thumbnail of Dim image...

global.asax Application_Error not firing

My global.asax seems not to be firing. I have: void Application_Error(object sender, EventArgs e) { // Code that runs when an unhandled error occurs Server.Transfer("~/ExceptionFormView.aspx"); } In my web.config, I don't have anything lie CustomErrors. As I want everything to be handled by Global.asax and transferred to Exc...

execute stored procedure using sqldatasource and get return value in vb.net

How can I execute a stored procedure using sqldatasource and get the return value in vb.net. Thanks, Terri ...

What is the lifetime for a session cookie?

I say until you log out, session times out or you close the browser. But am I right? I had an interview today and the interviewer wanted to know if I log into a page and closes the browser (without logging off), what happens to the session. I said that the session will be orphaned. He says no - because their users are able to connect ...

Any good source code to learn MVP from?

Hi guys, i know MVC is the future but for some of us still stuck in the good old webform land, i'm trying to learn how to do TDD and introduce better testing for our current application... basically the asp.net 2.0 c# web app is quite complicated with some logic in sproc, some in the javascript via json data processing, some in user co...

ASP.NET - I'm needing a static music player that remains on the page playing no matter if the user navigates away to another page within the site.

Hey everyone.. I am needing to have a music player (something like a strip down at the bottom of the page that goes all the way across), that remains at the bottom even when the user navigates to another page within the same site. The purpose of this is to play music on the website no matter where the user goes on the website. Hopeful...

how to insert DateTime column in textbox

this is part of my code //Instantiate the object we have to deal with string Name = txtName.Text; string Description = txtDecription.Text; string Topic = txtTopic.Text; string Sponsor = txtSponsor.Text; string Location = txtLocation.Text; System.DateTime StartDate; Start...

JQuery Validate: How do I add validation which checks the sum of multiple fields?

I'm trying to use jQuery validation for a dynamic form I'm setting up. In some cases this form contains a set of input boxes which are suppose to total 100. An example might be: Please indicate what percentage of students are in each grade? Grade 9: TextBox1 Grade 10: TextBox2 Grade 11: TextBox3 Grade 12: TextBox4 I want to veri...

Open source flashcard application / architecture

I'm looking to write a asp.net flashcard application and was wondering if anyone knows of a free or open source flashcard application that I could use as a reference? Or even better if there was a asp.net or jquery/javascript flashcard app out there? Thanks. ...

Thread leak running webbrowser control in an asp.net web service.

I'm running a webbrowser form inside an asp.net WCF web service. I'm creating a second thread for the webbrowser form and then creating a third thread to run the message loop for the form. My problem is that I can't figure out how to stop the third thread and dispose of the webbrowser form. Without stopping the third thread then the seco...

Ajax the old way

I would like to know how a script manager manages to execute a button click, Dropdownlist selectedindexchange etc.. events without marking the method a [WebMethod] and making it static Does this mean i will be able to call a method using Ajax on button click ? Also can some one provide me a example which posts data to ASP.NET webpages us...

What's the best deployment strategy for ASP.NET

I work for an ISV and we have a vanilla ASP.NET (no mvc) web application which we deploy to our customer sites. We're currently doing it via xcopy and IIS manually. What's the best technology to use to deploy it? ClickOnce? WebDeploy? Something else? Tips appreciated. ...

Regular Expression validator with file upload control (asp.net) does not work in FireFox

I am using Regular Expression validator with file upload (Asp.Net) control in-order to restrict the files uploaded. My regular expression is as follows: ^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.wmv|.avi|.mpeg|.MPEG|.mp4|.MP4|.flv|.f4v)$ It gives error message of the validator even after uploading the right file in Firefox. But it ...

User Control in asp.net

Can anybody tell me the steps to be covered in order to create a user control in asp.net.Is there any difference in user control and custom control in asp.net. ...

In visual studio 2005 build mode drop down, release mode not shown

Hi, Recently I got a project when after opening in visual studio 2005 in build mode drop down, only debug mode is shown but release mode not shown.Project builds successfully in debug mode is there a way to enable release mode. Thanks ...

MIME Types and exporting to different applications (excel, word , pdf ...etc etc)

i was wondering what really happen behind the scene when i write a file with mime type like this application/vnd.ms-excel i mean i export to excel like this: gridView.Page.Response.Clear(); gridView.Page.Response.Buffer = true; gridView.Page.Response.AddHeader("content-disposition", "attachment;filename=G...