webforms

How Can I Actually Use The JQuery Validation Remote Validation in ASP.NET Web Forms

I have searched everywhere, and I can't seem to find a solid example. Is anyone doing this? Can anyone provide and example of calling a remote validation using the JQuery validation plugin through a WebMethod in an aspx page (Web Forms)? ...

"ASP.NET Webforms MVP" as an alternative to "ASP.NET MVC"

Some days ago I discovered a "thing" which is called the ASP.NET MVP framework ( http://webformsmvp.com/ ) What do you think of that ? Is it worth to take a look on it ? Has anybody already experiences with that ? I come from the "webform side" (and also from the desktop development) and really don't want to move to ASP.NET MVC for th...

Is it possible to optimize ASP.NET WebForms to perform as fast as ASP.NET MVC?

There's so much hype about ASP.NET MVC these days, but the truth is that ASP.NET webforms is not going anywhere for some time. Is there any way for current developers to optimize ASP.NET webforms to perform as fast as ASP.NET MVC? I have noticed a significant difference in speed between ASP.NET MVC and ASP.NET webforms. MVC is a lot sna...

Can ASP.NET state management be daunting for beginners?

To all you ASP.NET experts and beginners, do you look at a state management as a difficult and annoying task to do? If you were to start over with ASP.NET would you consider ASP.NET MVC and never have to deal with ViewState again? Also , is it true that once you go ASP.NET MVC you never go back to ASP.NET Webforms (Unless of course your...

How to preserve quotes in a Rails form submission?

How does one preserve the original quotes? The quotes are required when submitting a quoted search string, for example. Search form example1: ruby "new york" Search from example2: "new york" Resulting params[:q]: for example1: "ruby \"new york\"" for example2: "new york" Note that Rails throws away quotes if the entire string i...

Bug in Chrome, or Stupidity in User? Sanitising inputs on forms?

I've written a more detailed post about this on my blog at: http://idisposable.co.uk/2010/07/chrome-are-you-sanitising-my-inputs-without-my-permission/ but basically, I have a string which is: ||abcdefg hijklmn opqrstu vwxyz || the pipes I've added to give an indiciation of where the string starts and ends, in particular note the fin...

Retrieve ID of deleted Database row in C#

I have a FormView through which I set up the default new, update and delete commands for communicating with an SQL Server database. When the CREATE command is executed the data is added to the database and some images are uploaded to a server and linked to the database. Problem When I press the Visual Studio's default FormView DELETE ...

What is proper ASP.NET style?

I'm just starting to do web pages in ASP and all of the code just feels... messy. <% if (new Random().NextDouble() < 0.5) { %> <asp:Image ID="image" runat="server" ImageUrl="~/1.jpg" /> <% } else { %> <asp:Image ID="image" runat="server" ImageUrl="~/2.jpg" /> <% } %> Currently, I have a very basic page that is light on content...

How to deal with multiple step forms where one of the forms are not submitted

Say you have a submission process that requires two forms. The submission of the 2nd form triggers an email. What do you do if the second form isn't submitted? Say the user forgets or closes the window by accident. My only solution was to update the DB with a flag from the submission of the 1st form that identifies an email has not been...

Aligning text vertically inside a label div

I'm trying to recode one of my older forms. It was filled with tables that I want to replace with CSS. However I'm having trouble having text and a form element aligned vertically together. As the picture shows the text defaults to starting at the top instead of in the middle. The blue highlights around the row is dreamweavers interpre...

Web User Control validation doesn't stop page events

This is a weird problem. I have created Web User Control with two TextBoxes and two CustomValidators (server-side only). I have also implemented IValidator interface and created ValidationGroup property that deafults to null. The problem is that when I put this control on a website it doesn't block events when it's not valid. I've set C...

How do I add a custom attribute to a templated ascx file?

I would like to decorate my ascx with an attribute so that when I search for types that have that attribute it will appear. The issue is that it seems like I can only add it to the base class which means that when I do a LoadControl on the type I don't get the ascx file, I get base class. I'm trying to avoid having controls require being...

HTML input field disable input but still POST

Basically i want a disable text field to show the value stored in a database but i don't want it to be editable by the user. i've tried using disabled="disabled" but then it no longer POST to my form handler... Any suggestions? thanks ...

Remove, replace or disable dynamically-generated ASP.Net js code

I am working with a few .Net 4.0 webforms controls such as the Menu control and while I think it's great that I can now declare the way in which controls are rendered (i.e. as either tables or divs), I can't switch off the automagically-included javascript that manages the hover events for those controls, for example: new Sys.WebForms.M...

calling a javascript function when user clicks 'X' to close a form

I already have a 'Close' button that calls some javascript function. However, if the user just clicks the 'X' to close, the function is never called. Any way to call a function when 'X' is clicked, or hide the 'X'? Thanks. ...

Creating an unordered list with asp.net controls?

I've got this web control that I've been dynamically adding controls to but now the requirement is to add an ordered list around the controls. To render the controls I add the controls to ControlsCollection protected void Page_Load(object sender, EventArgs e) { var document = XDocument.Load(@"http://localhost:49179/XML/...

Question about VB2010 web control

okay I want to fill an online form using vb2010, but the problem is that it doesn't have ID: <form class="dailiesAnswer-input dailiesForm" action=""> <textarea style="height: 44px;" class="dailiesAnswer-text-area">ANSWER HERE</textarea> <input class="submit-button" value="Submit" t...

Can a ::before selector be used with a <textarea>?

I'm experimenting with some styles on <textarea>s and I tried doing some stuff with ::before and ::after selectors and I couldn't to anything to get them to work. So the question is: is this possible? I know the CSS surrounding forms is arcane beyond mention but it seems like this should work. ...

ASP.NET MVC 2 server-side validation for ajax form

Hi all! I've faced the following problem. I'm developing a form for the site and this form should have validation. I wanna to use native ASP.NET MVC 2 validation functionality but get stubborn with it. I have a form that is loaded via $.get and displayed using jQuery UI modal dialog. All examples I found explains how to use MVC validati...

does DOM order determine the order of form parameters posted?

If I have a form like this: <form> <input name="param[]" /> <input name="param[]" /> <input name="param[]" /> </form> Can expect to receive these parameters in the same order when the form is submitted? I've noticed that Chrome, Rails, and Webrat preserve the order of the parameters, but that may be caused by implementation det...