webforms

What is a good asp.net (NOT MVC!) reference application for a beginner?

I'm looking for a good asp.net webforms reference application. We have some developers with VB6 experience, but no web application experience. I'd like to provide them with a couple of example apps that make use of a few simple forms, some user controls, db access, etc. An application that made use of a separate project for classes w...

Web scraping sites that require javascript support

Possible Duplicate: Screen Scraping from a web page with a lot of Javascript I just want to do tasks such as form entry and web scraping, but on sites that require javascript support. And I also need to enter forms, scrape, and so on in the same session. Ideally, I'd like a way to control a web browser from the command line. And...

JavaScript form code not working?

I have this form in my site that uses JavaScript to clear the fields when clicked on (highlighted) and also checks to see if all the fields have been filled in. I've used this code for other sites and it works fine. I can't figure out why it doesn't work now! Everything is the same from the previous code! ...

Form submit in DIV using jQuery

I'm referring to a problem similar to the one in this post, because the solution described there doesn't work for me. The starting point is a HTML page (called profile) with jQuery UI tabs: <div id="tabs"> <ul> <li><a href="#realtab">Foo Bar</a></li> <li><a href="?cmd=changePassword" title="pwd-settings"> ...

How would I add a PHP statement to conditionally subtract?

I have a form that uses PHP to calculate a total based on the selections that the user makes. There are 13 selections total. There are two sections that I am stuck on, "Blue" and "Orange": If the User selects "Blue", $250.00 is added to the price If the User selects "Orange", $150.00 is added to the price The thing I am trying to figu...

HTML interface to RESTful web service *without* javascript

Even if I offer alternatives to PUT and DELETE (c.f. "Low REST"), how can I provide user-friendly form validation for users who access my web service from the browser, while still exposing RESTful URIs? The form validation problem (described below) is my current quandry, but the broader question I want to ask is: if I go down the path of...

asp.net literal control bgcolor

How can I change the bgcolor and font of my asp:Literal control? Can you give me an example? ...

Access HtmlHelpers from WebForm when using ASP.NET MVC

I am adding a WebForm from which I would like to resolve routes to URLs. For example, in MVC I would just use return RedirectToAction("Action", "Controller"); So, if you have a way of getting to that same URL from a WebForm in the same application, it would be appreciated. ...

ASP.NET MVC, Webform hybrid

We (me and my team) have a ASP.NET MVC application and we are integrating a page or two that are Web Forms. We are trying to reuse the Master Page from our MVC part of the app in the WebForms part. We have found a way of rendering an MVC partial view in web forms, which works great, until we try and do a postback, which is the reason f...

Whats the right way to label things in a form?

I've seen lots of ways to label things in a form such as <label>, <div>, <span>, etc. Is there a right or wrong answer for this? Are there any advantages/disadvantages to any of these? Thank You ...

Jquery, Ajax form and redirection

Ok, I need to use ajax for some fancy pop-ups and validation things but I want to avoid javascript redirect if everything is ok in form. Here is the basic-simple scenario. We have dynamic site and some user login form. Al logic (does user exist, is password ok etc) is on a server side. Server pseudo code look like this: $username,$p...

jQuery: submit disabled fields

I know the defined behavior for web forms is to not submit disabled fields... but that's not the definition I want. I want to use ajax to post the form and I want it to get all fields, even if they are disabled. I don't want to build a workaround where I make the field "look disabled"... or have to hack it where I enable the fields -> ...

Getting data out of a Silverlight control

I am relatively new to Silverlight development and I am trying to figure out how to get data out of a silverlight control that I have made. I have a Silverlight control that gathers a bunch of graphical data points. The Silverlight control is embedding in a asp.net webforms application. The page that is displaying the control also doe...

Where is the event handlers wired up when using AutoEventWireup ?

I am trying to track down a bug in a web application, that seems to relate to AutoEventWireup being used. When and how is the events wired up when using AutoEventWireup ? I know that it happens runtime, but exactly in which framework class/method ? (I am hoping that I will be able to step through the framework code). ...

raising a confirm dialog via jQuery on asp:LinkButton click event

Consider an ASP.NET webforms app where the requirement is to raise a confirm dialog when an asp:LinkButton is clicked. The results of the confirm dialog should allow or block the postback for the linkButton_click method. The plugin/library currently being used is the jquery.alerts.js (found on ABeautifulSite). <script src="http://labs....

<authorization> can protect pages?

Can I use <authorization> to protect webforms from being accessed if a person does not have a specific role? I tried this: <authentication mode="windows" /> <authorization> <allow roles="Admin" /> <deny users="*" </authorization> but if the role Admin is not available then I can still visit the page by typing in the url. How can...

Change textbox's css class when ASP.NET Validation fails

How can I execute some javascript when a Required Field Validator attached to a textbox fails client-side validation? What I am trying to do is change the css class of the textbox, to make the textbox's border show red. I am using webforms and I do have the jquery library available to me. ...

ASP.NET chart control: pie chart and custom sized labels

Consider a pie chart using the ASP.NET charting controls. The requirement is around controlling the text that's rendered on the pie chart. The goal is to limit the number of characters on the label. The chart currently is bound to a SqlDataSource. <asp:Chart ID="myPieChart" runat="server" DataSourceID="myDS"> <Series> <asp:Se...

How to subscribe to page events in Web Application Page

Hi, I am migrating from ASP.NET 1.1 and I used to subscribe to page events using designer which adds subscriptions to InitializeComponent method on the page. In the ASP.NET 2.0, how can I subscribe to Page events from the designer? Not using designer this seems to work. protected void Page_Init(object sender, EventArgs e) { /...

Set and get Id on check box

Hello I have an array of "Id's" that comes from DB. I have also a table like this : And the "Id's" array contain record id, ie: Array ( [0] => Array ( [id] => 1 [code] => GHY87 [description] => Hello World ) ) Now i want, when i checked any-one check box & then click on Edit Button(Link) then i get the id of that check box. NOTE: I...