webforms

Can a client dictate whether or not HttpContext is created?

We are getting a lot of hits from Googlebot and BingBot and it appears that none of these requests have an HttpContext. I originally thought that every http request will get a context which obviously is not the case so I'm trying to understand how does an HttpContext gets constructed, is it part of the negotiation between client and ser...

how to execute a asp.net page asynchronously?

Hi, how to execute a asp.net page asynchronously? So I am displaying a page to the user, but when an event happen, I need to execute another page, without using ajax, but using C# code. I am using asp.net webforms. thanks ...

How can I create new PDF files based on a template where some text will be replaced?

I'm developing a CMS aplication in ASP .Net using WebForms and I'm looking for a way to create new PDF files based on a template. This feature will be used to generate contracts where some placeholders will be replaced with the customer data. What's the best approach to do that? Edited: The templates will be static, the main content w...

Making a concurrent AJAX WCF Web Service request during an Async Postback

I want to provide status updates during a long-running task on an ASP.NET WebForms page with AJAX. Is there a way to get the ScriptManager to execute and process a script for a web service request concurrently with an async postback? I have a script on the page that makes a web service request. It runs on page load and periodically us...

Create / build / generate a web form that doesn't redirect the user to another site, looks modern and can be implemented easily?

I have a small web site and would like to add a 'contact us' form and a 'feedback' form. i would like the forms to satisfy the following: 1- be modern looking (with beautiful css effects) 2- the form fields are validated properly and 'inline'. What I mean is once a user skips a required field or enters an email address incorrectly som...

Simple list based output instead of style and javascript ridden ASP.net webforms menu

Hi All, Is there a way (or component i could use) to output a simple menu. I just need it output as a list, like you would use for a simple superfish menu. I've looked at the menu control and cssadapters (css friendly) which kind of works, except there is a lot of styles and javascript output with the menu which is destroying the look...

<%: %> brackets for HTML Encoding in ASP.NET 4.0

Accidentally I found this post about a new feature in ASP.NET 4.0: Expressions enclosed in these new brackets <%: Content %> should be rendered as HTML encoded. I've tried this within a databound label in a FormView like so: <asp:Label ID="MyLabel" runat="server" Text='<%: Eval("MyTextProperty") %>' /> But it doesn't work: The text ...

Webforms Vs Asp.Net MVC VS2010 LoadTest

A colleague of mine ran a simple load test using VS2010 on a Webforms project and an Asp.net MVC project and noticed that Webforms was serving around 83 requests per second whereas Asp.net MVC was serving 28 requests per second. Both the sites were published on the same server with similar settings. Webforms project had 10 pages 5 of th...

Databinding in ASP.NET User Control

What is the best way to create a data bound ASP.NET user control? I have a user control that contains a drop down list and three label controls. I would like to data bind the drop down list, and have the label controls display different properties of the data source. I have Googled for an example of IDataSource and User Control, but ...

Cache web forms in client side

is it possible to cache form contents on client side? Like maintaining state even if the form is un-saved and the user moves to a new page then returns back to the form? ...

Windows Desktop Gadget issue with IFRAME?

We're doing some preliminary explorations of Windows Desktop Gadgets here at our company and we've decided to try our first one simply by embedding an IFRAME inside the gadget HTML and pointing it to a web page we already have hosted on our intranet. The page on our intranet includes JQuery (whose calls seem to be working inside the pag...

Runtime HttpException affecting only one page/usercontrol

We're having an issue with a .NET 3.5 WebForms site where occasionally our error logs start filling up with the following error message: "Multiple controls with the same ID 'ctl09' were found. FindControl requires that controls have unique IDs." I know very little about the exception as I have never seen it while debugging locally and ...

posting form with file upload

I am having trouble with uploading a file when using jquery. I have the following HTML in a form. <fieldset> <ul> <li> <div class="field"><input size="35" type="file" name="formFile" id="formFile"/></div> </li> <li> <div class="field"><input size="35" type="text" ...

SortCommand Event handler of DataGrid not working

I have created an event handler for the OnSortCommand of DataGrid: <asp:DataGrid id="dtgBatches" runat="server" Width="100%" CssClass="intTable" EnableViewState="False" DataKeyField="bat_GUID" GridLines="Horizontal" AllowSorting="True" AutoGenerateColumns="False" AllowPaging="False" > <SelectedItemStyle Ba...

Button inside a repeater with dropdownlist

I have a repeater with a literal, a dropdown list, and a button. <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="rep_ItemDataBound" onitemcommand="Repeater1_ItemCommand"> <ItemTemplate> <div class="buypanel"> <ul> <li>Choose finish <asp:DropDownList ID="ddlFinish" runat="server"></asp...

Extremely Difficult Problem with ASP.Net 4.0 WebForms app using Routing

I have a completed app running in a QA environment. Everything works fine under most circumstances. If you hit a plain URL (no identifying information in the URL), you see an intro page with a button (generated by an asp LinkButton control) that posts back and directs you to another page. The markup looks the same when it fails and wh...

New to ASP.NET: Webforms vs MVC2

I am new to ASP.NET Development and can't decide between developing with Webforms or MVC 2. Nevermind the pros and cons of each. I've seen mixed opinions of each. But which method would be the best for someone who has no prior experience in ASP.NET or C#? If your answer is: learn both, then which should I learn first? MVC 2 or Webforms?...

web: How can I place an input box in a picture?

I want to use a picture as my website design. It's a plain one, like google's. <img src... done... > now, I want to place an input box at the text area of the picture, how to I do that? ...

how to: get rid of __doPostBack from link buttons?

for example: this code: <asp:LinkButton ID="SignInLinkButton" runat="server" CssClass="SignInLinkButton" TabIndex="3" OnClick="AuthorizeUser">SignIn</asp:LinkButton> shows this as link in status bar: javascript:__doPostBack('ctl00$ctl00$GlobalPageContentPlaceHolder$ManagePageContentPlaceHolder$SignInLinkButton','') is there a chan...

form id renamed to aspnetForm

When I compile and run a web application ASP.NET appears to be renaming the id of the form on the page, from id="login" to id="aspnetForm". It's messing up my stylesheet which expects the form with login for the id. Changing the css is not an option as it was provided by a designer and I don't want to modify it at all. How do I stop aspn...