Search Results

Search found 10041 results on 402 pages for 'validation controls'.

Page 123/402 | < Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >

  • How to Create A Document Type Definition

    - by DaveDev
    Hi Guys I've been creating a lot of my own custom attributes in my XHTML documents lately, and am aware that because they are custom attributes, they won't validate against the W3C standard. Isn't it true that I can specify my own DTD to make it validate? If so, can anyone tell me what's involved in doing this in an ASP.NET MVC app? Thanks Dave

    Read the article

  • Best way to validate currency input?

    - by Abe Miessler
    I have created the TextBox and CompareValidator below which I thought would allow input in the following forms: 5 5.00 $5.00 Unfortunately it's not allowing the version with the dollar sign in it. What is the point of doing a type check against currency if you don't allow the dollar sign? Is there a way to allow this symbol? <asp:TextBox ID="tb_CostShare" runat="server" Text='<%# Eval("CostShare", "{0:$0.00}")%>' CausesValidation="true" /> <asp:CompareValidator ID="vld_CostShare" runat="server" ControlToValidate="tb_CostShare" Operator="DataTypeCheck" Type="Currency" ValidationGroup="vld" ErrorMessage="You must enter a dollar amount for 'Cost Share'." />

    Read the article

  • Add 'Current' property to ASP.NET control

    - by Alex
    Hi! I have some control. I add one instance of this control to every Page in OnInit event and I want to access this control in other places in this way: Sample.Current public class Sample : Control { public static Sample Current { get { // ??? } } } Can you tell me what is the best way to do this property implementation?

    Read the article

  • How to detect if a form input element of type file is empty

    - by Ankur
    I have some code which reads a file through a form field of type file <input type="file" ... /> I want to give the user another option of providing a url to a file rather than having to upload it as many are already online. How can I detect when this field is empty on the server side. I am using Apache Commons FileUpload FileItemStream item = iter.next(); name = item.getFieldName(); stream = item.openStream(); if(!item.isFormField()){ if(item.toString()!=""){ .... I need to detect when item is empty. The above code doesn't work, nor does using: if(item.equals(null)){ ....

    Read the article

  • Easy way to use Images in WPF

    - by j-t-s
    Hi All I've only just started using WPF. (I'm a WinForms guy), and from what I can see, trying to simply drag an image onto the Window is a huge PAIN. There seems to be no way where you can just select an option to tell it what picture to put indide the image control. I've seen so many sites within the last 10 minutes with atleast 10lines of code just to insert animage into a window. Is there an easier way?

    Read the article

  • script attributes

    - by Alex Ivasyuv
    Hi, I need to control some script elements, that's why I want to add class attribute to do it. But, w3c says that it's invalid. Some effect, if I add rel or id attribute. Any other ideas how I can access appropriate script tag? Doctype: XHTML 1.0 Strict Thanks,

    Read the article

  • WPF Custom Control containing a List of Objects

    - by Cecile
    Hi, I have an object Trip in my object model containing a list of Nodes (e.g. NodeName, StartDate and EndDate) and I am trying to build a Custom control in WPF that draws list of rectangles: one for each Node contained in the Trip object (based on StartDate en EndDate) Would you have any hint on how the Custom Control should be structured so that I can bind a Trip object to it and draw the rectangles properly, please?

    Read the article

  • jQuery Validator - Dynamic Text

    - by James
    Adding a validator to my form: jQuery.validator.addMethod('whatever', function(val, el) { // whatever goes here }, 'A maximum of ' + $('#my_id_here').val() + ' categories can be selected.'); This doesn't fly. I always get undefined. Is this a good, simple way to do this? Thanks

    Read the article

  • Grid related UI design question

    - by younevertell
    Grid related UI design question I want some 16-grid (4 rows and 4 columns) user interface, and fill the grid with some round shapes. I also want to use the MouseOver, mouse left button down, and Mouse Left Button Up events to set the state of grids as selected or not selected. My questions: 1. How fill the grid with some round shapes? by SetColumn and SetRow? 2. How to make the grids respond to the mouse please? Thanks <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions>

    Read the article

  • PHP displaying error for already used Username and empty field

    - by Pixel Reaper
    I want PHP to make sure the username is not already used and also check to see if the field is empty. Sorry I am a huge noob when it comes to php. Here is my code: // Check for an Username: $dup = mysql_query("SELECT user_username FROM users WHERE user_username='".$_POST['user_username']."'"); if(mysql_num_rows($dup) >0){ $errors[] = 'Username already used.'; } else{ $un = mysqli_real_escape_string($dbc, trim($_POST['user_username'])); echo '<b>Congrats, You are now Registered.</b>'; } else { $errors[] = 'You forgot to enter your Username.'; }

    Read the article

  • Jquery scroll to first instance of a class (.error) for jquerytools validator

    - by Tommy Arnold
    I am using jquerytools validator on a clients website but the page using this plugin is very long so I would like to add a custom handler using the folowing code. $("#form").bind("onFail", function(e, errors) { // we are only doing stuff when the form is submitted if (e.originalEvent.type == 'submit') { $(".errormsg").html("Please scroll up and fix the highlighted errors."); //alert("Please fix the highlighted errors to continue"); } }); How would I get it to scroll up to the first instance of .error? Can you recommend any plugins for this?

    Read the article

  • PHP reporting error. DB verify how to?

    - by iamfab
    Error reporting Notice: Undefined variable: random_chars in wamp\www\php_sandbox\idgen.php on line 21 Call Stack: # Time Memory Function Location 1 0.0045 678928 {main}( ) ..\idgen.php:0 GPB7446 How do I fix this error? Using this code like an automatic unique id generator. How do I connect to DB to verify code is truly unique before allowing it to be assigned to a user creating a new account? Thanks <?php $characters = array( "A","B","E","F","G","H","J","K","M","N","P","R","S","T","W","X","Y","Z"); $keys = array(); while(count($keys) < 3) { $x = mt_rand(0, count($characters)-1); if(!in_array($x, $keys)) { $keys[] = $x; } } foreach($keys as $key){ $random_chars .= $characters[$key];} $randNum = rand(2327,9987); $randLet = rand(2327,9987); echo $random_chars . $randNum; ?>

    Read the article

  • Adding validations without knowing the fields

    - by Frexuz
    My example form <% form_for @ad do |f| %> <%= f.error_messages %> <p> <%= f.label :ad_type_id %><br /> <%= f.collection_select(:ad_type_id, AdType.all, :id, :name) %> </p> <p> <% @ad.ad_properties.each do |property| %> <%= property.name %>: <% f.fields_for :ad_values do |value_field| %> <%= value_field.text_field :ad_id, :value => @ad.id %> <%= value_field.text_field :ad_property_id, :value => property.id %> <%= value_field.text_field :value %> <% end %><br /><br /> <% end %> </p> <p> <%= f.label :description %><br /> <%= f.text_area :description %> </p> <p><%= f.submit %></p> <% end %> Explanation: Ad has many properties. I can add new properties at any time (it's a normal model). Lets say the Ad is of the type 'hotel'. Then I would add properties like 'stars' and 'breakfast_included' Then I store each of these properties' values in a separate model. And all this works fine with my form above. My problem: These fields are not validated because I can't know what their names are. I need to add validations dynamically somehow. My thought: #Before the normal validations kick in def add_validations self.properties.each do |property| property.add_validation :whatever #somehow :) end end How could I do this?

    Read the article

  • How can i create a ModalPopupExtender control dynamically from a server control?

    - by Colour Blend
    I have a composite server control that does quiet a number of things; one of which is to display a ModalPopup OnClick of a dynamically generated HtmlAnchor control. I need to create this ModalPopupExtender control dynamically in my server control and trigger it from within. I have been able to create it and trigger it from a button created at design time but not at runtime. This is as a result of the ID assign to the link is always not found by the ModalPopupExtender control. I have tried assigning a static ID but no success. Can anyone help?

    Read the article

  • simple method that checks text is email with regular expression

    - by user223863
    Can't believe how difficult this seems to be all I want to is to validate a user inout using javascript to make sure that it is an email address. But can't get it to work: I am using: //validates a regulaer expression Utilities2.prototype.validateEmail = function(stringToValidateArg) { alert('about to check regexp'); var regExpPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; alert(regExpPattern.test(stringToValidateArg)); } But this always returns false, any ideas why is it because of the regular expression?

    Read the article

  • asp.net mvc2 validate type double

    - by ile
    [MetadataType(typeof(Deal_Validation))] public partial class Deal { } public class Deal_Validation { [Required] public string Title { get; set; } public double? EstValue { set; get; } } How to validate EstValue (check if it is of type double?) Thanks

    Read the article

  • How does one validate an entire site?

    - by American Yak
    I realize there's the W3C validator, which works great for one page. There's also the perl install they provide, but it seems to not work on a Mac or it's buggy. Given that 1) I have an entire set of local files How do I a) Validate the entire set b) do it behind a firewall c) do it simply without installing anything on my computer? (i.e., is there a web service?) Or is this just futile?

    Read the article

  • Using user editable image URL in application. Security issues.

    - by sharas
    Hi there. I am writing an application where users are required to show their photo, however as my server resources are very limited I can not let them upload it to the server. So I have three major questions: 1. How to properly validate photo URL? At least I can validate with regexp, however I need to check for file ending: `validates_format_of :photo_url, :with => URI::regexp(%w(http https))` 2. Security issues? XSS? Even I validate the picture at the moment of creation, hacker can replace image with malicious stuff anytime. 3. Maybe there are free asset stores with API?

    Read the article

  • RegularExpressionValidator always fails, but ValidationExpression works in testing

    - by Jerph
    I found the answer to this, but it's a bit of a gotcha so I wanted to share it here. I have a regular expression that validates passwords. They should be 7 to 60 characters with at least one numeric and one alpha character. Pretty standard. I used positive lookaheads (the (?= operator) to implement it: (?=^.{7,60}$)(?=.*[0-9].*)(?=.*[a-zA-Z].*) I checked this expression in my unit tests using Regex.IsMatch(), and it worked fine. However, when I use it in a RegularExpressionValidator, it always fails. Why?

    Read the article

  • Help creating a dll for a custom control

    - by Chapso
    I'm going to ask a newbie question here. I need to use a control I found online in my code, but it was written in the wrong language. It is in C# and I am using VB.net for work. I have all of the code for the control which works beautifully in C#, but I had issues with it not working very well in VB. The source code and a demo project are available here, but I am not sure exactly which files I should use to build the dll for VB. It seems a lot to ask, but would someone mind taking a look and pointing me in the right direction? Cheers

    Read the article

< Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >