asp.net

Can an ASP web service return a ZIP file?

I'd like this to be possible! Can you write a web service (using C# and an asmx) that returns a ZIP file? If so, can you give a simple example? Thanks ...

How do I run 2 or more copies of the same WebSolution at the same time?

I have a solution with 8 seperate Web Apps which are required to redirect/link to each other on occasion. Also I use Subversion as my sourceControl and do development in one branch and bug fixing in another. Thus I can have more than one copy of the web suite on my machine at once. For the purposes of this question let's say they are ...

ASP.NET AJAX for Windows Server 2008 64 bit machine

Hi I have a web solution which uses ASP.NET AJAX Controls and has been running on Windows Server 2008 32 bit machine very well. Now the server admins want to move this web to a new Windows Server 2008 64 bit machine, I was just wondering if ASP.NET AJAX is compatiable to this system, I can't seem to find anything about this issue by g...

How do I move service references to their own assembly?

A little background: I'm creating a set of adapters to allow communication with mobile devices over different cellular networks. This will be achieved using a class factory pattern. At least one of the networks requires a service reference to communicate with their devices through a web service. So far I've got 3 assemblies so far wh...

Bad idea to alter asp.net mvc framework autogenerated database?

Is it a bad idea (and if why?) to add a a column to the auto generated asp.net (ASPNETDB.MDF, visual studio 2008, mvc framework) "user roles - database"? (E.g I want to add the columns RealName and LastName to the aspnet_Users table in the database.) The reason I want to add a column instead of creating an entire new table is to avoid ...

How do access the contents html.textbox while on the page in asp.net MVC

Hi everyone, i am trying to access the contents on my textbox while on the page. is there anyway of doing that ? Thanx Owais ...

Opacity issue with css, div, and asp:Image

Hello, I have a div that has it's opacity set to 60. Inside the div, I have an asp:Image. It looks like the opacity of the div is also setting the opacity of the image. I tried creating a separate class for the image and setting the opacity to 100, but this doesn't seem to work. Does anyone have a solution? <div id="PleaseWait" cla...

How do I convert from a possibly Windows 1252 'ANSI' encoded uploaded file to UTF8 in .NET?

I've got a FileUpload control in an ASP.NET web page which is used to upload a file, the contents of which (in a stream) are processed in the C# code behind and output on the page later, using HtmlEncode. But, some of this output is becoming mangled, specifically the symbol '£' is output as the Unicode FFFD REPLACEMENT CHARACTER. I've ...

Dot Net Open Source Quiz or Test Builder

I am currently building a tutorial site for one of our projects. I need to offer a quiz at the end of the tutorial that pulls from a pool of questions and pictures and randomly selects 10 questions for the quiz. Anyone know of an open source app or library that is available? ...

Virus upload scanning asp.net

How do you prevent people uploading viruses to your asp.net windows website ? The only user content I'll be showing are images, sounds and video, can these contain viruses ? ...

AJAX - Nested UpdatePanels. How to prevent inner from being updated?

I have a outer updatepanel that has a few buttons and a inner updatepanel within the outer one. Both of them are set to updatemode=conditional. I would want the updates to happen independent of each other. However, when a button is clicked in the outer updatepanel, the inner updatepanel is updated as well. Is there a way to prevent thi...

Configuring an ASP.NET application in IIS

I've inherited some aspx (including the web.config file) and am getting the following error. I've created a virtual directory for it but I'm not sure how would I "configure it as an application"? Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please rev...

ASP.NET Multiple Field Validation

In ASP.NET 2, I've used Field Validators, and RequiredField validators, but I'm unsure of how to handle a case like this. I have two check boxes on a page, and I need to be sure that at least one of them is set. So, if you look at in binary, it can be 01, 10 or 11, but it can not be 00. My question is, what the best way to do this wit...

ASP.net Bin directory - dll loading

I need to use a dll in my asp.net application. How do I load a dll not from a bin directory? Perhaps I should mention that the application is a mixture of asp code and asp.net code. so, when I develop it on my machine, I place a dll in the bin directory, but after I move the code to the live environment, I don't want to have a separate...

How to add common code (specifically to methods marked WebMethod())

I have some ASP.NET page and webservice WebMethod() methods that I'd like to add some common code to. For example: <WebMethod()> _ Public Function AddressLookup(ByVal zipCode As String) As Address #If DEBUG Then ' Simulate a delay System.Threading.Thread.Sleep(2000) #End If Return New Address() End Function ...

ASP.net: How to make list of object sortable when bind to control such as gridview?

Hello, I got a class let's call it Blah. I use ObjectDataSource to get the data from the database and the value is bind it to Blah's property for example, Column Foo is Blah.Foo in my class. I can bind ObjectDataSource with a list of Blah to a gridview but i can't make it sortable since the datasource is not datatable. Does anyone have l...

Binding a DropDownList in ListView InsertItemTemplate throwing an error

I've got a ListView which binds to a LinqDataSource and displays selected locations. The insert item Contains a dropdownlist that pulls from another LinqDataSource to give all the unselected locations. The problem is that I get the following error when loading the page: Databinding methods such as Eval(), XPath(), and Bind() can only ...

Why can't I cast result of Linq to SQL?

I have a Linq to SQL DataContext with SQL functions into it. While the retrieve object is good, I would like to add a property to the object and same time shortens the object name. So I made an object Reminder that inherits from the Linq to SQL object fnRTHU_ReminderByTaskResult with the property I wanted. public class Reminder : fnRTHU...

How do I add Javascript attributes to ASP.NET RadioButtonList items?

I'm trying to add some onmouseover and onmouseout attributes to any of the <input>, <td>, or <label> elements for each ListItem of a RadioButtonList. How do I do this? Here's what I've tried. This does not work... ASPX File... <asp:RadioButtonList ID="RadioButtonListPaymentFrequency" runat="server" RepeatDirection="Vertical"...

Multiple Languages(English, French) on ASP.NET Page

Hi, I was just wondering what is the best way to handle multiple languages on a web page? Should I create an event in the load where I change the labels of all my controls to the approrpiate language text, or is there a better way? I am using .NET framework, thanks. ...