asp.net

Export an IQueryable Collection to Excel

I have a huge IQueryable that I want to export directly to Excel for data dumps, how would I do this? I was trying to put it into a GridView and export from there, which works if I use only a chunk of the data, but if I use the whole IQueryable, nothing happens. This is a table with 4k rows and each row has 70 or so columns. Edit: CSV...

Url Rewriting problem

Hi, Presently I am working with asp.net with c#. In my project has requirement of url rewriting functionality. I did with my local iis but when it comes to production it's not working. Is there any way of doing url rewriting with change the iis setting in production environment. ex:http://abc.com/profiles/suresh I want this type of fu...

override PrincipalPermissionAttribute SecurityAction.Demand method

how can I override PrincipalPermissionAttribute SecurityAction.Demand method? ...

MVC with IIS 6

Hi there, I've read a couple of posts on this issue but still can't seem to get MVC working on IIS 6. I've mapped .mvc to aspnet_isapi.dll in IIS but get a 404 when I browse to my mapped URL which looks like this RouteTable.Routes.MapRoute("action", "api.mvc/{controller}/{action}", new {action = "Index"}); I then browse to //localhost...

How do I data bind to a generic list in ASP.NET 3.5?

I want to bind my ListView control to a generic list of objects? I thought I could code: listView1.DataSource = fCol.ToList; listView1.DataBind(); I get a cannot convert to object error. I'm sure in Windows programming you use the BindingSource object. Is there a web forms equivalent? ...

ViewState problem in asp.net Wizard control

We are using an ASP.NET (2.0) Wizard control where on each wizard step the user fills in a few fields. We have found that sometimes for some odd reason the value of the fields in previously filled steps is lost when "postbacking" to another step. This problem seems to occur randomly; sometimes some of the field values are retained and ...

Javascript and ASP.NET 2.0: How can I know if the page is valid (after validation takes place) in Javascript code on the client?

I need to know if all the client-side validator checks have succeeded, or if one or more validators are not valid. I suppose there should be a variable on the client-side (like its counterpart Page.IsValid on the server) that reports whether the page is valid. Am I right? Anyone any ideas? ...

ASP.NET C# OnMouseOver Event to Make ListBox Appear and Disappear

I have a single webform that has a listbox and a button. When the onmousover event fires the listbox will appear; however on page load, the listbox should not be visible. I have the following code (please excuse the background color changes): Button2.Attributes.Add("onmouseout", "this.style.backgroundColor='Blu...

Some form of Progress bar when something is loading in ASP.NET?

Is there a easy way to show some form of progress bar on your form in ASP.NET that the code is busy running in the background (meaning thinking)? Like the default I.E have the small little window on the top that moves when its thinking.......... I have done this before with Ajax but its alot of work and my site is not a Ajax enabled sit...

Disable GZIP compression for IE6 clients.

We need to conditionally disable GZIP compression if user's browser is IE6 (it hangs browser for 5min) in few pages of larger site. Server is IIS7 and has compression for static content turned on - want that compression left working if user agent is not Mozilla/4.0. ASPX code sample anyone? Alternatively, code to conditionally redirect ...

order by not working

I am using an objectdatasource with a gridview to get data from my orm class, but I cannot get it to order by properly. I am using the code below but it does not come up in descending order like I have specified below. What am I missing? Using subsonic 2.1 <DataObjectMethod(DataObjectMethodType.Select, True)> Public Function FetchByP...

After Refresh(F5) the Page the Check's CheckChanged event is not fired,the Check is child control of Gridview .

I have 3 gridview control in my page. each grid itself i am using check box as a TemplateField.when i am selecting the first grid check box. it displays some records.In this time when i am press the F5(Referesh) button.All the events in the Page not fired. check box in the Grid: <asp:GridView ID="gvSelectQuest" runat="server" AutoGene...

Accessing controls in the edititemtemplate of a listview

I am working with the listview control. By default I am showing the itemtemplate with an edit button. When the edit button is pressed the listview switches to the edititemtemplate. I need to populate one of the controls in the edititemtemplate based on the item being edited - I've tried accessing the control (via FindControl) in the Item...

ASP.NET Application Licensing Patterns, Strategies, Best Practices

We have a suite of products that are all built on the Microsoft ASP.NET platform. The products run on a common platform (set of services) and each product is highly modularized (basically in the UI layer, features/modules can be turned on or off). A given site may license the platform and 2 modules but not the other 5. Right now we ma...

Enterprise Security Application Block in Conjunction With MembershipProvider in ASP.NET

Looking to implement authentication/authorisation for ASP.NET app Was looking into using Provider model MembershipProvider SQLServerMembershipProvider etc as makes good sense to me. However I'm looking into the Enterprise Security Application block as well. My question is can/should the two be used in tandem? ...

Can I determine the ZoneInfo from an IPAddress?

Hi folks, is there anyway I could figure out an estimated (Olson) ZoneInfo value (eg. ("America/Los Angeles", "Europe/London", etc.), for a single public IP address ... in .NET? I already have a full list of ZoneInfo values, so that's not a problem ... and in a drop down box. I just want to default a selected value based on an IP. I ...

Detailsview Row Height and/or row spacing

How can I make a specific detailsview row of a specific height? I tried css and itemstyle-height, but I seem to have misplaced my brain and/or visibly don't understand how some things work in that. May sound stupid or inappropriate of a use, but I want to use a detailsview to show information about something, and I'm separating informat...

Is it possible for IIS 6 to serve unprocessed ASP/ASPX pages?

The only thing I was able to find on the subject was a posting from 1997 (http://insecure.org/sploits/microsoft.asp.iis.html), so I was hoping someone on here might have more recent knowledge on this topic: Does anyone know if there are any known vulnerabilities in IIS6 that would allow a user to view an unprocessed ASP or ASPX page, ou...

asp.net custom grid vs GridView/ListView

A few years ago, I decided to create my own DataGrid as I didn’t like the standard one provided by Microsoft. It’s a very simple function which takes a DataTable as an input parameter and which returns a string (the html code to display a table on a webpage). It’s very flexible (there are some optional parameters to do the paging, sort...

What is the Microsoft Enterprise Application Blocks relationship to the ASP.NET provider model?

What is the Microsoft Enterprise Application Blocks relationship to the ASP.NET provider model? (if any) ...