asp.net

Why is aspnet_compiler.exe so slow (and can it be made any faster)?

During our build process we run aspnet_compiler.exe against our websites to make sure that all the late-bound stuff in ASP.NET/MVC actually builds (I know nothing about ASP.NET but am assured this is necessary to prevent finding the failures at runtime). Our sites are fairly large in size, with a few hundred pages/views/controls/etc. ho...

About Asp.Net DataList Commands And EventValidation

I have Datalist that is inside an updatepanel and it is in panel in modalpopupextender; I can list items as I wanted. I am also putting 2 buttons nfor Delete and AddBelow. Here is the markup: <asp:DataList ID="SpeedDialsDL" runat="server"> <ItemTemplate> <table id="speedDialValueEditorTable" width="1...

How to find checked RadioButton inside Repeater Item?

I have a Repeater control on ASPX-page defined like this: <asp:Repeater ID="answerVariantRepeater" runat="server" onitemdatabound="answerVariantRepeater_ItemDataBound"> <ItemTemplate> <asp:RadioButton ID="answerVariantRadioButton" runat="server" GroupName="answerVariants" Text='<%# DataBinder.Eva...

What is the best way to code navigational logic in ASP.NET

Can this be done without MVC? Is there an easy way to abstract or encapsulate navigational logic? I currently have quite a lot of the following in my code behinds (and I know it's probably not the best thing to be doing): protected void btnNext_Click(object sender, EventArgs e) { ... if (condition1) { Response.Redirect("~/N...

How do I remove a page from the browser history?

I have an have an ASP.Net page which contains a button. This Page contains a ServerSide Paypal button. When pushed my server does various clever things on the back end and then rewrites the response as a form and some javascript which posts this form to paypal.. This all works great. However, if the user then elects to click back, the...

C# Adding style to a control

I have a Panel and I am adding controls inside this panel. But there is a specific control that I would like to float. How would I go about doing that? pnlOverheadDetails is the panel name pnlOverheadDetails.Controls.Add(lnkCalcOverhead); The control named lnkCalcOverhead is the control I'd like to float. Thanks in advance EDIT: B...

ASP.NET Ajax Error: Sys.WebForms.PageRequestManagerParserErrorException

My website has been giving me intermittent errors when trying to perform any Ajax activities. The message I get is Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, ...

Any 'Page.PreviousPage' call causes the client page render to stop,

Any 'Page.PreviousPage' call causes the client page render to stop, i know its only the client as i can pull out the results of methods even after the 'page.PreviousPage' line of execution from the server(using mbox[running it local]) -using 'Server.Transfer' on a button - with the target's PostBackUrl in the button setts -and 'Previou...

Rendering Excel from browser

Hi, I have some content that i have to render as a excel file in browser. I was able to render a grid content to excel with the below code. Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=FileName.xls"); Response.Charset = ""; Response.ContentType = "application/vnd.xls"; System.IO.StringWrite...

RadioButtonList.SelectedIndex vs RadioButtonList.SelectedValue

Hi all, out of curiosity, anyone knows the particulars of the internal implementation of ListControl.SelectedIndex = (int) VS ListControl.SelectedValue = .ToString()? I'm having difficulties with a custom validation object we've built here to process all validation in one sweep. I suspect using will raise a SelectedIndexChanged e...

Image Dropdownlist

I am looking for a drop down list which can present the user with a series of images to choose from. Each image will be about 50x50 pixels and a small text description will be under the image. A jQuery and compatable ASP.NET solution would be preferred. ...

ListView Shows Repeated Elements When the Underlying Generic List Does Not Contain Repeated Elements

I am binding a generic List to an <asp:ListView /> control to display a tag cloud. The elements in the list are Tag objects, where Tag is basically just something like: public class Tag { public string Name { get; set; } public int Total { get; set; } } I create the List<Tag> object and then bind it to a ListView but when the ...

Do I have to use J2ME for Blackberry development?

I would like to begin developing for the Blackberry platform and, specifically, the Bold and also the Storm device which is coming out soon. Do I need to get into Java and J2ME or can I develop sites in ASP.NET and just keep utilizing the skills I already have? I am completely new to mobile platform development and have no idea what it...

Translate a url to a route

Hi there! I feel like I'm re-inventing the wheel here, but I need to find a way of taking a URL from a catchall,and redirecting that to another route. The reason for this is because I need to do some things like adding session cookies for certain urls, and then pass them on to their relevant action. What's the best way of implementing...

Custom Errors for "App" folders? (ASP.NET)

Where can I setup custom errors for directories in my application such as App_Code, App_Browsers, etc.? I already have customErrors configured in the web.config and that works as expected. For example, http://www.mysite.com/bla.aspx > redirects to 404 page but http://www.mysite.com/App_Code/ > displays "The system cannot find the fi...

Difference between Multiview control and AjaxToolkit Tabs

Is there a major difference between the Multiview control in ASP.NET 2.0 and the Tab control in the AjaxToolkit? Other than the built in visuals of the tab control, is there anything different in the way they handle the hiding/showing of controls? ...

Avoid losing PostBack user input after Auth Session has timed out in ASP.NET

I have a form that sits behind ASP.NET forms authentication. So far, the implementation follows a typical "out of the box" type configuration. One page allows users to post messages. If the user sits on that page for a long time to compose the message, it may run past the auth session expiration. In that case, the post does not get r...

How to get rid of View State completely in .NET

How can I get rid of: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="..."/> Completely ! ...

Sample web Page using Mono and XSP on windows box.

Hey, I'm attempting to get my first ASP.NET web page working on windows using Mono and the XSP web server. I'm following this chaps example. The first part of his example works very well with the latest version of mono. however the web part seems to fall over with the following error '{Path Name}\Index.aspx.cs' is not a valid vir...

Webresource.axd problem between regular and secure domain paths

In our setup there are two different websites in IIS 7 setup that point to the same physical path. One with the binding http://websitename.domain.com/ (virtual root ~ is /) and the second at https://webserver.domain.com/userid/websitename (so the virtual root ~ is /userid/websitename). We use the second for secure aspects of each websi...