asp.net

Unhandled Exceptions with Global.asax

I am emailing unhandled exception details from global.asax. How can I get the path and/or filename of the aspx file or assembly file where an exception was not handled. This info was showing up in the exception's stack trace when I was developing & testing. When I deployed the global.asax to production, this info is no longer showing up...

What would cause ASP.NET validators not to trigger on a deployed site?

Locally it works, I know its the "it works on my machine" syndrome but i cant see why. Simple web page, fields, required field validators, such as <asp:textbox id="tbEmail" runat="server" CssClass="field"></asp:textbox> <asp:requiredfieldvalidator id="Requiredfieldvalidator2" runat="server" Display="Dynamic" ControlToValid...

Why does my repeater keep crashing on Eval(NULL) values?

<asp:Repeater ID="rptLessons" runat="server"> <ItemTemplate> <tr> <td><%#Eval("fullname")%></td> <td><%#isCompleted(Eval("totallessons"), Eval("completedlessons"), Eval("totalNumAvail"), Eval("totalNumCorrect"))%></td> <td><%#FormatPercent(Eval("totalnumcorrect") / Eval("totalNumAvail"))%>...

How to display a Reporting Services report as an inline PDF, in a ASP.Net and C# web page?

I need to display a preview of a report, in an ASP.Net web page (using C# server side scripts). The preview needs to be a PDF rather than HTML and displayed inline (possibly in an iframe?). Is it possible to specify the headers of a report rendered as a PDF, so its 'Content-Disposition' is inline rather than attachment? Or is there an...

Postback issue in ASP.NET

I have an asp.net label control with its Visible property set to false. In the code-behind I'm setting its visibility to true/false based on whether the user has logged in or not. A weird behavior is that on postbacks, the code-behind executes and sets the value of the label's visibility to whatever, and then the markup executes and sets...

ASP.NET 2.0 add styles dynamically to page in a control

I need to add to the page from within a custom control. I can't use a stylesheet (.css) because I'm using a url(...) and need to resolve the url. Right now I'm doing: Page.Header.Controls.Add(new LiteralControl("<style type='text/css'>.xyz { color: blue; }</style>")); But I'm hoping for something a touch more elegant? ...

What would cause a bogus 404 for an IIS-served ASPX page?

I have a fairly simple ASP.NET application, set up as a Web Application Project in Visual Studio. There is one particular aspx file called "invoice.aspx" which IIS refuses to serve. The URL I am using is definitely correct, and other aspx pages from this directory load and execute just fine. But not this ONE page! I've put a break po...

ASP.NET: Best practice for binding Usercontrols inside a formview

Hello, I need to edit a complex object with complex properties using a web form. For example, editing a "User Information" record that contains all kinds of information about a user, including complex things like a unique tree for each user. What I did was this: I created a web form with a Formview control, and set the object I want to...

.net Date period selector

Hi everyone, I am looking for a .net control that allows the users of my webapp to select a period in time. Basically something like the control google provides in their analytics application, where you can select a begin and enddate in one calendarcontrol. It doesn't even has to be ajaxenabled because it is against company guidelines ...

Securing part of a site with an existing cookie and no login controls

I have a small web app, and a requirement is to secure only part of the site. To enter the main content, the user has two select a certain value from each of the two drop down boxes on the Default page and then agree to some Terms and Conditions. After this, they are redirected to a page with sensitive content. This page with sensitive ...

ASP.NET - Getting a list of dates between X and Y and databinding them to a DropDownList?

Hi Everyone, I am hoping that this is possible and easy! As the title says, I want to specify two dates and get a data set of dates by specifying the start and end date, then be able to bind that to a DropDownList control on my page.. If it isn't possible (which is a damn shame) does anyone have recommendations or best practices for d...

How do I implement the Stack Overflow search box?

In the interest of sincere flattery I would like to emulate the search box that Stack Overflow presents its users at the top right of the screen. I would like to be able to duplicate the AJAX/type ahead nature of this text box as closely as possible (but over my own data set). Does anyone know if this is custom built control or does it...

struggling with programmatically adding user controls

I have the same problem as in the question Programmatically added User Control does not create its child controls. After reading the question and answer I changed my code which now looks like this: foreach (ITask task in tasks) { TaskListItem taskListItem = LoadControl( typeof(TaskListItem), new object[] {task} ...

A work around Group By Clause Limitation

I'm working on a social network web application, and i got a situation where i need to resend reminder emails to users who haven't activated their emails. The problem is when i investigated the DB i found that many emails are duplicated (there was no validation on the email uniqueness apparently. So what i need to do know is to retrieve ...

asp.net secure images against static requests from other users?

I work on a site that generates dynamic images for each specific user. Sometimes these images contain depictions of very sensitive data. Lately we have started to see requests for images that belong to a different user in the form of http://myapp/images/someuid/image1.jpg obviously, someone figured out they could access another users i...

.NET: Hitting the back button messes up my event handler

Hey all. I have a ASP.NET page that lists a bunch of user accounts. If I click on a user, an event called LinkChosen is fired, which opens the account view page for that user. I can also search for users, which narrows down the list. This event is called btnSearch_click If I click on a user, LinkChosen() is called, and I'm taken to a ...

.NET Application Failing - Resolved by Recycling App Pool

I am looking at a .NET ASP application (from the support side - I didn't program it). It intermittently hangs - the web page doesn't open. Recycling the app pool fixes it. I can see entries in the event viewer stating "A process server application pool 'wsfrappPool' exceeded time limits during shut down. The process id was '9396' from...

Why can't I access any properties on my jQuery-returned object?

Hi! I have the following javascript: $(document).ready(function() { $('#<%= DropDownList1.ClientID %>').change(function() { $('#<%= TextBox1.ClientID %>').disabled = $('#<%= DropDownList1.ClientID %>').selectedIndex != 1; }); }); When I change the index of the dropdown, nothing happens. I have tried to replace the cod...

Label Text Property and entities

Hi, The following asp label fails to be displayed in the browser, can someone please tell me what I am doing wrong. I expect to see the value <abc> but instead I get nothing. <asp:Label ID="Label1" runat="server" Text="&lt;abc&gt;"></asp:Label> By the way, I realize that I can accomplish the same thing doing the following: <asp:la...

ASP.NET 1.1 Web Services & jQuery

I've been looking for an example of a 1.1 web service getting called using jQuery. I'd like to call a web service and pass a few parameters to it. Can someone point me in the right direction? Thanks! ...