asp.net

Best way to Search

I am building a real estate website. I have a table for properties (i.e. "houses"), a table for pictures, a table for features, etc. So each property's data comes from three, not only one table. I need to provide a function that retrieves requested property data depending on a search criteria, for example: property of the week feature...

Webservice return type changes unexpectedly

I Integrate a web service that returns several DataTables. When I update webservice reference, sometimes some methods' return type changes from DataTable to a class that looks like an array of 2 items (one for schema other for datatable). In browser we look at the reference datatable looks like that : <?xml version="1.0" encoding="u...

Determining ASP.NET client ids

This question is similar to http://stackoverflow.com/questions/546392/forcing-client-ids-in-asp-net but not quite. ASP.NET generates clientids according to its own internal mechanism. I would like to run a xmlhttprequest query in the background to do an update and selectively reload some of the controls. My plan is to run the query and ...

Programatically Setting Page Setup Options in Excel

Hi, I have a ASP.NET Web App which is copying a Report to an Excel Sheet by creating an HTML table and copying the contents. I want to fit the excel report into 1 page before firing the print option. This needs to be done programatically while I'm generating the Excel workbook. Please provide a solution to this asap. ...

Is the ASP.Net Inproc session timeout reset if the SessionID is accessed?

I read here that an inproc asp.net session resets it's timeout everytime it is accessed (read or write). My question is, if the timeout is also reset if I only read the sessionID? Example: Session timeout is set to 20 min. After 15 min. of inactivity I load a page and read the Session.SessionID. Will the session still exist after 10 mor...

Rich Text Editor on a web page

I am trying to add a rich text editor in my web page where users can write reviews and format what they have written...something similar to the editor in which we write our posts on this site... can anyone point me to the right direction regarding this...any tutorial that would help me build such a component... Also i want a free product...

listview in C#

hi, I am using the listview with C# in VS.NET 2003. I would like to select a single cell (not just cells in the first column). I want to have a cell free selection and it highlight the selection in the cell as well. ...

Why does my session variable appear to empty itself in ASP.NET?

I have user control on a ASP.NET web page, which contains a GridView and a radio button selector. In the underlying middle tier I have a thread which goes to the database and then raises an event to say "I have some data" my User control handles this event and sets a Session Variable. This works and I can see the event being handle...

Excel Report Setting page setup options in C#

I am using the following approach to create a dynamic Excel Report from HTML in my ASP.NET Application. While creating the excel report, I want to set the Page Setup options such that the report fits into one page. This is the approach I'm using to create the excel report... Please tell me how to fit this report to one page or to zoo...

Streaming a zip file over http in .net with SharpZipLib

I'm making a simple download service so a user can download all his images from out site. To do that i just zip everything to the http stream. However it seems everything is stored in memory, and the data isn't sent til zip file is complete and the output closed. I want the service to start sending at once, and not use too much memory. ...

How to deal with special characters in ASP.NET's HyperLink.NavigateUrl?

I am currently having troubles figuring out how to handle a filepath to be (dynamicly) passed out to a HyperLink control's NavigateUrl property. Let's say that I'm trying to refer to a file named jäynä.txt at the root of C:. Passing "file:///C:/jäynä.txt" result to a link to file:///C:/jäynä.txt, as does HttpUtility.UrlPathEncode("fil...

WebResource.axd requested without parameters - This is an invalid webresource request

I'm finding this problem every now and then in my production website, and it has me absolutely stumped... My app works perfectly in both dev and production, but every now and then, I get an e-mail from my global error handling with this: MESSAGE: This is an invalid webresource request. URL: /WebResource.axd (which means that for some r...

Static files and authentication in ASP.net

Hi! Say I have a virtual folder /topFolder/ in IIS7, and in that folder there can be any file that can be displayed in a browser (xml, html, swf, doc etc - typically "unmanaged" resources from the IIS perspective). Before giving the request permission to open any file below the folder, I need to check some session variables in order to...

ASP.net can't update page from event handler

i have a linkbutton on a page, the event hander for the click event of that button calls a method on an object which in turn makes a call to a webservice, when the webservice returns the object fires an event and an event handler on the page codebehind updates a label on the page. For some reason the label doesn't display the message. T...

Folders to ignore on subversion commit

Which folders may I not commit to subversion server? I'm talking about an standard asp.net web application in Visual Studio 2.008. I think the bin folder because it's files are regenerated, is there any other? ...

How to have multiple logins with ASP.Net?

I'm working on a website with an internal and an external section. The users for both sections are different so they require a different login page. I wanted to configure the authentication differently for both folders, but ASP.Net but it's not allowed. Example (in my main web.config): <authentication mode="Forms"> <forms loginUrl...

How do I turn off Visual Studio's formatting options?

So I have this annoying issue with Visual Studio (when working with C#), I've been digging around in the C# formatting options, general VS options and on google and MSDN but can't really find a fix for this - I'm assuming there's just a checkbox somewhere and I've just overlooked it. Here it is: I like to format my code like this: Type...

Load and Query Web Configuration

Is it somehow possible to load a web.config file in a WinForms app and query the resulting configuration, instead of using XML to find some less than semantic 'add' element? ...

combine scripts in asp.net ajax toolkit

We are using version 3.0.20229.0 of the asp.net ajaxControlTookKit (before .net 3.5 sp1). I was wondering if I can combine our custom javascript files into the ScriptResource.axd that the controlTookKit creates. I've found this article (http://blogs.msdn.com/delay/archive/2007/06/11/script-combining-made-easy-overview-of-the-ajax-contr...

Handling Unhandled errors that happen in a secondary threaded process.

I have a asp.net 2.0 web app which calls a long running stored proc (about 3 minutes). The sp actually performs many tasks on the backend. My page uses threading and ajax (update panel) and a timer control to dispaly a progess bar to the user. This all works great unless there is an error in the sp which just freezes the screen. I ha...