asp.net

Accessing styles programmatically to get values

In our application we have style sheets to define common colors etc… I wrote a quick and dirty function where I get a dataset from a stored procedure, lop off the columns that I don’t want to show, cram it into a programmatically generated DataGrid, set that DataGrid’s styles, then export it to Excel. Everyone loves the colors in the E...

Getting the failed url in a custom 404 error page

Is it possible to get the URL of the failed request from a custom 404 error page? I'm using IIS to set the custom error page to a .net page where I want to process the failed request. I've tried using the url and referer attributes from the request object but they don't work. ...

OutputCache and RenderAction cache whole page

I have a ViewPage that contains <% Html.RenderAction<MyController>(c => c.SidebarStats()); %>. On the controller action for the action SidebarStats I have an OutputCache action filter to cache only that part of the page. However, the whole page is getting cached and not just that action. I remember seeing somewhere that this might be ...

Setting a checkbox by using <%# isChecked %> expression

Here is a simplified example of what I am trying to achieve; <asp:CheckBox runat="server" Checked="<%# this.isChecked %>" id="myCheckBox" /> Then in my code behind; public partial class _Default : System.Web.UI.Page { bool _isChecked = true; public string isChecked { get { return _isChecked.ToString(); ...

linq Order By for a List(Of myObjects)

How do I order by a passed string value on my list of objects? i need to do paging and sorting on my List(Of) objects the paging is no problem but I don;t know who to get the Order By to work. Here is what I am currently doing and it's working great: Return returnReports.Skip(PageSize * (PageNumber-1)).Take(PageSize).ToList() How do ...

SelectedIndex = -1 with data bound Combo

Is there any equivalent to this when a combo is data bound? I've been through this hundreds of times before, but I'm having a brain freeze moment. ...

ASP.NET Page Properties Good Idea or Bad Idea

I have tended to shy away from adding properties to my ASP.NET pages. It never seemed like a great idea to me. However, recently I have seen the practice employed in a few sample applications. Has my aversion to adding custom properties to a page been unwarranted or is this a "it depends" situation? ...

ASP.Net Calendar/Events application

I'm wondering if there are any free calendar/event tracking applications for asp.net out there. I want to be able to plug something into my existing website that will let an admin log in and add events to a calendar. Users can then see a short list of links of upcoming events on the front-page which they could then click to see more deta...

set a default page in dynamic data

hi everyone, i am trying to set up a default page for my dynamic data website.. the problem is that its a template so it would be something like this: Orders/List.aspx can anyone please help me out with this.. Thanx Owais F ...

.NET Winform AJAX Login Services

I am working on a Windows Form that connects to a ASP.NET membership database and I am trying to use the AJAX Login Service. No matter what I do I keep on getting 404 errors on the Authentication_JSON_AppService.axd call. Web Config Below <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the ...

Are there any *FREE*, open source .NET shopping carts that allow bulk importing?

I have reviewed DashCommerce, nopCommerce and DotShoppingCart for possible use and all of them seem to not allow any way to do bulk product/category/manufacturer/etc imports from existing data (DotShoppingCart seems to allow it only in the paid version). The company I work for has some 30,000 products that we would need to load, and at ...

Downloading a text file in ASP.NET is appending the web page HTML!

Thanks to help I previously received on this forum I was able to get my asp.net web site to download all kinds of files to the client browser. For some odd reason, when I download text files, the HTML of the web page is being appended to the text! All other file types work fine! Here's the code that's doing the download: Public Sub...

Intranet Web Application Security

Using Active Directory / Windows Integrated authentication is a given. From a development standpoint, what is the best way to consume this? Is it through configuration? <location path="SecurePage.aspx"> <system.web> <authorization> <allow roles="MyDomain\My Secure Users" /> <deny users="*" /> </authorization> ...

Possible to display actual source code from codebehind on aspx page (for code example pages)

I am working on doing an aspx page to display code usage examples of a library. So basically, I'd like to for example have: Description Source Code Button Output (in a datagrid) Rather than copying and pasting the code from behind the button into the aspx page for display purposes, I was thinking it might be nice to be able to be able ...

AS400 Data Connection in ASP.NET

I have an application that will reside within a business2business network that will communicate with our AS400 in our internal network environment. The firewall has been configured to allow the data request through to our AS400, but we are seeing a huge lag time in connection speed and response time. For example what takes less than a ...

asp.net - How to render html tags in a ListItem text property?

Hi, I have a DropDownList control that is populated via server side. I use a For Each [datarow] loop and create a New ListItem In the DataRow is a column with the ID 'Title'; this field may contain either <B> or <I> tags. (ex. "[Title] in <i>[Parent Title]</i>") The problem I am facing is when I [DropDownList].Controls.Add([ListItem]...

Define global site style for asp:GridView with plain CSS (without using VS Skins)

I am working on a fairly large aspx web project with extensive use of asp:GridViews I'd like to use CSS to define in one place how all gridviews will look, by default. As far as I understand, one way of doing this is via "Skins" in Visual Studio....but I recall doing a bit of research a while back and found many people despised skins a...

Visual Studio Development Server using wrong port

Related to a previous issue that I thought was resolved and actually isn't... My Visual Studio 2008 installation may be a bit messed up, I think. When my ASP.NET project is set up to use VS Dev Server with a fixed port, I get the "Port in use" error described in the linked question. When my project is set up to use a random (auto-assi...

How to configure community server to make contact us page work?

I have a community server website, i have contact us page enabled in it, but for a reason i don't know its not working. But all notifications i receive on the same mail when some one send a comment on a post or forum. Any one can tell me whats the problem or how i can solve or configure? Thanks, ...

multiple httpmodule instances

I have an asp.net website that uses a web application and they are both in the same application pool (with 1 worker process). The website has a httpmodule loaded in it's web.config file and curiously both the main website and the application will be served by seperate instances of the httpmodule. Why is this? Since they are in the sam...