Search Results

Search found 3025 results on 121 pages for 'textbox'.

Page 10/121 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Problem Creating dynamic Id for textbox in asp.net mvc

    - by Fraz Sundal
    I have 3 textboxes in three different tab control and i want to generate textbox id like textbox plus concatenate the tab number for(int i=0;i<3;i++) { <%: Html.TextBoxFor(e=>e.vcr_LinkName + i)%> } its not working but when i change it to for(int i=0;i<3;i++) { <%: Html.TextBox("vcr_LinkName" + i)%> } it works fine. but i want to use textboxfor instead of textbox

    Read the article

  • Red border around TextBox when validation fails

    - by hungster
    I am using ASP.NET MVC 2. Html.DropDownListFor and Html.TextAreaFor automatically get red borders when the validation fails. How to make the four borders of a TextBox (using Html.TextBoxFor) red when it fails validation? For example, I have a TextBox that is required and when the user submits the form without specifying a value in the textbox, I want the textbox to have red borders.

    Read the article

  • Dynamically create textbox

    - by comii
    I need to dynamically create textbox. This is my code, but with this I create only one textbox: Public Sub CreateTextBox() Dim I As Integer Dim niz As Array For I = 1 To 5 Dim myTextBox = New TextBox myTextBox.Text = "Control Number:" & I Me.Controls.Add(myTextBox) Next End Sub So how i can dynamically create textbox? Thanks!

    Read the article

  • Textbox LostFocus event fires after Command Button's OnClick event

    - by Homam
    Hi all, I have a TextBox and a ToolStripButton in a windows forms application, the TextBox implements an event handler for the LostFocus event, and the ToolStripButton implements an event handler for the Click event, but the TextBox LostFocus event fires after the ToolStripButton Click event, which event in TextBox fires before ToolStripButton click event ?

    Read the article

  • Rotating Cursor According to Rotated TextBox

    - by j-t-s
    Hi All I have a TextBox that I allow my users to rotate. But what I would LOVE for my users is to have their Cursor rotate to the same angle that the TextBox was rotated at. For example, if they rotated the TextBox to 28°, then when the Cursor enters that TextBox the Cursor should also rotate itself to 28°. Any help at all will be greatly appreciated. Thank you :)

    Read the article

  • Building a custom textbox in GTK

    - by CommuSoft
    I want to make my own GTK# Textbox, the textbox should draw the text and it's cursor on a special way. However keyboard and mouse-handling is quite complex and is also influenced by for instance the operating system (for instance the use of dead keys) Is there a way to build such a control without having to worry about keyboard input? I assume I have to make a textbox control that inherits the original textbox control. How can I handle drawing requests and mouse movements?

    Read the article

  • Pocket IE has some maximum width for textboxes?

    - by eidylon
    I have a page running on WinMo 6.1 Pocket IE. It seems I cannot make a textbox wider than 219 pixels, is this the case? I've tried width="100%" width="300px" style="width: 100%;" style="width: 300px;" columns="50" but no matter what I do, the textbox will not grow beyond 219 pixels wide, which looks kinda dorky on a 320x screen. Does pIE really limit the width of a textbox???

    Read the article

  • SSRS Tablix Header Row Formatting

    - by tnriverfish
    I've got several reports and they have been built with various formatting. Nothing huge just the header row is different between them. I'd like to pick a standard and just update the reports so they all look the same. This can be done on a textbox by textbox basis - setting the font, font color, font size and background color. It seems like I should be able to select more than one textbox and set the formatting on them all at once but the "textbox properties" item is disabled when I've selected more than one. Any thoughts?

    Read the article

  • WPF texbox focus when render to offscreen buffer

    - by dr.mo
    i am rendering a textbox to an offscreen buffer using RenderTargetBitmap and i want to enter text into this textbox, however, i can't set the textbox focus (using Focus() has no effect - presumably because the canvas is not attached to a real window?) this has two consequenes: 1 the keyboard input doesn't get captured 2. even if i set the text manually using TextBox text and CaretIndex = index i dont get a caret because of the lack of focus. is there a way to make this focus somehow? and if not, i'd like to at least have the caret visible even if there is no focus, but can't see a way of doing this.

    Read the article

  • Data-binding taking to long to update

    - by Justin
    In my application I have this code in my view model: hiddenTextContainer.PreHideVerticalOffset = VerticalOffset; hiddenTextContainer.HiddenText = Text.Remove(SelectionStart, SelectionLength); hiddenTextContainer.HasHiddenText = true; hiddenTextContainer.NonHiddenTextStart = SelectionStart; Text = Text.Substring(SelectionStart, SelectionLength); SelectionStart = Text.Length; hiddenTextContainer.ImmediatePostHideVerticalOffset = VerticalOffset; This code is used to hide selected text in a textbox. Text is a string property data bound to the text property of a textbox and VerticalOffset is a double property data bound to the VerticalOffset property of that same textbox. I need to save the VerticalOffset before and after the hiding of selected text takes place, but with my code below both hiddenTextContainer.PreHideVerticalOffset and hiddenTextContainer.ImmediatePostHideVerticalOffset are always set to the same value no matter what. I have figured out that this is because the text of the textbox has not been updated by the time the code reaches: hiddenTextContainer.ImmediatePostHideVerticalOffset = VerticalOffset; Is there any way I can fix this?

    Read the article

  • Data-binding taking too long to update

    - by Justin
    In my application I have this code in my view model: hiddenTextContainer.PreHideVerticalOffset = VerticalOffset; hiddenTextContainer.HiddenText = Text.Remove(SelectionStart, SelectionLength); hiddenTextContainer.HasHiddenText = true; hiddenTextContainer.NonHiddenTextStart = SelectionStart; Text = Text.Substring(SelectionStart, SelectionLength); SelectionStart = Text.Length; hiddenTextContainer.ImmediatePostHideVerticalOffset = VerticalOffset; This code is used to hide selected text in a textbox. Text is a string property data bound to the text property of a textbox and VerticalOffset is a double property data bound to the VerticalOffset property of that same textbox. I need to save the VerticalOffset before and after the hiding of selected text takes place, but with my code below both hiddenTextContainer.PreHideVerticalOffset and hiddenTextContainer.ImmediatePostHideVerticalOffset are always set to the same value no matter what. I have figured out that this is because the text of the textbox has not been updated by the time the code reaches: hiddenTextContainer.ImmediatePostHideVerticalOffset = VerticalOffset; Is there any way I can fix this?

    Read the article

  • Previous active control in javascript

    - by zohair
    Hi, I wanted to know how I could find the previous active control on a page. I have a couple of textboxes and a button, and when i am on a certain textbox and I click the button, I want to highlight that textbox. I have the highlight functionality covered, but I don't know how to find out which textbox to run the function on... Please help, Thanks!

    Read the article

  • How can I anchor a textbox in wpf ?

    - by csuporj
    I have a window with tabs. On one of the tabs, I have a layout like below. (In fact it is more complicated, I have 4 text boxes in a row, and I have more rows.) How can I make the 3rd textbox have the width of the label + the width of the text box above, that is, to have them properly aligned ? The problem is that WPF widens the 3rd textbox, when I type text into it. Using hardcoded numbers for the sizes defeats the whole purpose of WPF. I could do that way 10 times faster in Windows Forms than in WPF. Is there a better way, than using a grid for each set of consecutive small text boxes, having to skip the large ones from the grid, because putting them in messes up everything. <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <Style TargetType="{x:Type Label}"> <Setter Property="VerticalAlignment" Value="Center"/> </Style> <Style TargetType="{x:Type TextBox}"> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="Margin" Value="3"/> </Style> <Style x:Key="SmallTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}"> <Setter Property="Width" Value="50"/> </Style> </Window.Resources> <StackPanel VerticalAlignment="Top" HorizontalAlignment="Left" Width="{Binding ElementName=grid,Path=ActualWidth}" Grid.IsSharedSizeScope="True"> <Grid Name="grid" HorizontalAlignment="Left"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" SharedSizeGroup="c1"/> <ColumnDefinition Width="Auto" SharedSizeGroup="c2"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Label Content="Foo:"/> <TextBox Grid.Column="1" Style="{StaticResource SmallTextBox}"/> <Label Grid.Row="1" Content="Foobar:"/> <TextBox Grid.Row="1" Grid.Column="1" Style="{StaticResource SmallTextBox}"/> </Grid> <TextBox Grid.Row="1"/> <Grid Name="grid2" HorizontalAlignment="Left"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" SharedSizeGroup="c1"/> <ColumnDefinition Width="Auto" SharedSizeGroup="c2"/> </Grid.ColumnDefinitions> <Label Content="Bar:"/> <TextBox Grid.Column="1" Style="{StaticResource SmallTextBox}"/> </Grid> </StackPanel> </Window>

    Read the article

  • ValidationProperty not returning entered value for textbox

    - by nat
    hi I have a custom control, (relevant code at the bottom) it consists of some text/links and a hidden textbox (rather than a hidden input). when rendered, the user via another dialog and some JS sets the value of the textbox to an integer and clicks submit on the form. i am trying to assure that the user has entered a number (via the JS) and that the textbox is not still set to its default of "0" the requiredfieldvalidator works just fine, if i dont change the value it spots it on the client and fills the validation summary on the page with the appropriate message. unfortunately when i do fill the textbox, the validator also rejests the post as the controls textbox text value is still set to "0", even though on the form it has changed. clearly i am doing something wrong.. but cant work out what it is? could someone enlighten me please, this is driving me potty if i step through the code, when the get of the mediaidtext is hit,the findcontrol finds the textbox, but the value is still set to "0" many thanks code below nat [ValidationProperty("MediaIdText")] public class MediaLibraryFileControl: CompositeControl { private int mediaId = 0; public int MediaId { get { return mediaId; } set { mediaId = value; } } public string MediaIdText { get { string txt = "0"; Control ctrl = this.FindControl(this.UniqueID+ "_hidden"); try { txt = ((TextBox)ctrl).Text; MediaId = Convert.ToInt32(txt); } catch { MediaId = 0; } return txt; } } protected override void CreateChildControls() { this.Controls.Add(new LiteralControl("<span>")); this.Controls.Add(new LiteralControl("<span id=\"" + TextControlName + "\">" + getMediaDetails() + "</span>")); TextBox tb = new TextBox(); tb.Text = this.MediaId.ToString(); tb.ID = this.UniqueID + "_hidden"; tb.CssClass = "hidden"; this.Controls.Add(tb); if (Select == true) { this.Controls.Add(new LiteralControl(string.Format("&nbsp;[<a href=\"javascript:{0}(this,'{1}','{2}')\" class=\"select\">{3}</a>]", dialog, this.UniqueID, this.categoryId, "select"))); this.Controls.Add(new LiteralControl(string.Format("&nbsp;[<a href=\"javascript:{0}(this,'{1}')\" class=\"select\">{2}</a>]", clearDialog, this.ID, "clear"))); } this.Controls.Add(new LiteralControl("</span>")); } protected virtual string getMediaDetails() { //... return String.Empty; } } this is the code adding the validationcontrol the editcontrol is the instance of the control above public override Control RenderValidationControl(Control editControl) { Control ctrl = new PlaceHolder(); RequiredFieldValidator req = new RequiredFieldValidator(); req.ID = editControl.ClientID + "_validator"; req.ControlToValidate = editControl.ID; req.Display = ValidatorDisplay.None; req.InitialValue = "0"; req.EnableClientScript = false; req.ErrorMessage = "control cannot be blank"; ctrl.Controls.Add(req); return ctrl; }

    Read the article

  • Binding a nullable int to an asp:TextBox

    - by Slauma
    I have a property int? MyProperty as a member in my datasource (ObjectDataSource). Can I bind this to a TextBox, like <asp:TextBox ID="MyTextBox" runat="server" Text='<%# Bind("MyProperty") %>' /> Basically I want to get a null value displayed as blank "" in the TextBox, and a number as a number. If the TextBox is blank MyProperty shall be set to null. If the TextBox has a number in it, MyProperty should be set to this number. If I try it I get an exception: "Blank is not a valid Int32". But how can I do that? How to work with nullable properties and Bind? Thanks in advance!

    Read the article

  • ext gwt textbox is empty?

    - by user153506
    i have a textbox received from designer.but i wrote action in GWT. the problem is textbox is empty but when textbox is filled by value by pressing button then alert box will be displayed informed that value has been changed. but not worked.help me. TextBox zip1 = null; function onModuleLoad() { zip1 = TextBox.wrap(DOM.getElementById("zip1")); zip1.addChangeHandler(zip1ChangeAction()); } private ChangeHandler zip1ChangeAction() { return new ChangeHandler() { public void onChange(ChangeEvent event) { Window.alert("change fired"); } }; }

    Read the article

  • Why is this method executing twice each time I call it?

    - by highone
    I have the following method that is executing twice every time it is called: public static void ChangeToRepository(RepositoryTextBox textBox, int repositoryNumber) { MessageBox.Show("you"); int indexOfLastRepository = (textBox.RepositoryCollection.Count - 1); if (repositoryNumber > indexOfLastRepository) { AddTextRepositoriesThrough(textBox, repositoryNumber, indexOfLastRepository); } textBox.RepositoryCollection[textBox.CurrentRepositoryNumber].CurrentText = textBox.Text; textBox.PreviousRepositoryNumber = textBox.CurrentRepositoryNumber; textBox.CurrentRepositoryNumber = repositoryNumber; textBox.Text = textBox.RepositoryCollection[textBox.CurrentRepositoryNumber].CurrentText; } The first time that the method executes, it executes all of the code except for its last line: textBox.Text = textBox.RepositoryCollection[textBox.CurrentRepositoryNumber].CurrentText; The second time, it executes all of the code. What's up?

    Read the article

  • Create WPF TextBox that accepts only numbers

    - by Elad
    I would like to create a TextBox that only accepts numeric values, in a specific range. What is the best way to implement such TextBox? I thought about deriving TextBox and to override the validation and coercion of the TextProperty. However, I am not sure how to do this, and I understand that deriving WPF control is generally not recommended. Edit: What I needed was a very basic textbox that filters out all key presses which are not digits. The easiest way to achieve it is to handle the TextBox.PreviewTextInput event: private void textBox_PreviewTextInput(object sender, TextCompositionEventArgs e) { int result; if (!validateStringAsNumber(e.Text,out result,false)) { e.Handled = true; } } (validateStringAsNumber is my function that primarily use Int.TryParse) Some of the suggested solutions are probably better, but for the simple functionality I needed this solution is the easiest and quickest to implement while sufficient for my needs.

    Read the article

  • Cant create 2nd textbox

    - by okinaw55
    Having problems with this code and cant figure out why. It works fine the first time through but crashes with a Parameter is not Valid error the 2nd time on this line. Dim tbx As TextBox = New Windows.Forms.TextBox Any help is appreciated. Dim tbx As TextBox = New Windows.Forms.TextBox tbx.Name = tbxName tbx.Size = New System.Drawing.Size(55, 12) tbx.BorderStyle = BorderStyle.None tbx.TextAlign = HorizontalAlignment.Center Using f As Font = tbx.Font tbx.Font = New Font(f.FontFamily, 8, FontStyle.Bold) End Using tbx.Location = New System.Drawing.Point(xCords, 44) Select Case tbx.Name Case "tbxBulk01" : tbx.Text = Bulk01Label Case "tbxBulk02" : tbx.Text = Bulk02Label End Select Me.Controls.Add(tbx) Stack trace as follows. at System.Drawing.Font.GetHeight(Graphics graphics) at System.Drawing.Font.GetHeight() at System.Drawing.Font.get_Height() at System.Windows.Forms.Control.get_FontHeight() at System.Windows.Forms.TextBoxBase.get_PreferredHeight() at System.Windows.Forms.TextBoxBase.get_DefaultSize() at System.Windows.Forms.Control..ctor(Boolean autoInstallSyncContext) at System.Windows.Forms.TextBoxBase..ctor() at System.Windows.Forms.TextBox..ctor()

    Read the article

  • Send keystrokes to TextBox

    - by tanascius
    I have a derived TextBox where I intercept the userinput to manipulate it. However I have to preserve the original typed input. So my idea was to hold an inner TextBox within my derived class and send the user's input to that TextBox before manipulating it. The reason for this approach is that I do not want to take care of all this special actions like: typing something, ctrl+a, [del], type something else, [backspace] and so on ... However I do not know how to send a single keystroke (keycode, ascii, char) to a TextBox. Maybe you have another idea without an inner TextBox at all? Thank you!

    Read the article

  • I get `System.Web.UI.WebControls.TextBox` instead of TextBox value

    - by Anna T
    Gooday. Could you help me figure out please why I get this: System.Web.UI.WebControls.TextBox on Label1: DataListItem item = DataList1.Items[0]; TextBox nume = (TextBox)item.FindControl("numeTb"); Label1.Text = nume.ToString(); I specify that the numeTb element is put like this in the ASPX file: <asp:TextBox ID="numeTb" runat="server" Width="400px" Text='<%# Eval("nume") %>' DataTextField="nume" DataValueField="nume"></asp:TextBox> I just added the DataTextField bits thinking might help, but no. Thank you!

    Read the article

  • Clone/mirror a textbox in a PDF form

    - by Tim Pietzcker
    I've got a PDF form in Acrobat X Pro where users can enter their name in a textbox on the first page. I would like the contents of that box to be cloned/mirrored in another box on the second page of the same form: However, in the Properties dialog of the second textbox, I can't find a way to reference the first one. I do have options to calculate numerical values and perform validation etc. etc., but I can't seem to simply have it display the contents of another textbox. Is this not possible in PDF forms, or am I overlooking something obvious?

    Read the article

  • By Pressing Enter key move to next Textbox in ASP.Net

    - by Malik Usman
    I have two textboxes and one Button control.....In first TextBox when press enter key moves to next textbox(Barcode) and when i press enter in barcode textbox it fires the button click event......till that its ok.... But what happening after fireing the Button click even on enter in Barcode Textbox its going back to focus on first textbox.........But i want this to stay in same Barcode TextBox to scan more barcodes. The code is below. <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"> </script> <Head> <script type="text/javascript"> $(function() { $('input:text:first').focus(); var $inp = $('input:text'); $inp.bind('keydown', function(e) { //var key = (e.keyCode ? e.keyCode : e.charCode); var key = e.which; if (key == 13) { e.preventDefault(); var nxtIdx = $inp.index(this) + 1; $(":input:text:eq(" + nxtIdx + ")").focus(); } }); }); </script> </Head>

    Read the article

  • Selective JQuery validation

    - by TenaciousImpy
    Hi, I'm using JQuery Validation to validate a particular textbox in my form. The textbox is an optional website section, which uses the url validation method. This works fine and validates accordingly. I would like to have http:// preset into the textbox, to save the user having to type it. However, when the text is set, the validator becomes 'active', and prevents anything on the form being submitted until either the http:// is manually removed, or a valid website is entered. Is there a way of preseting text into the textbox, which won't cause the validator to start validating? I tried to use $("[id$='tbWebsite']").val("http://"); just before I call form.validate(), but it doesn't work (i.e. it still gets checked). I've never used JQuery Validator before, so hopefully there's a fix for this that I'm missing! An alternate solution for my case in particular, could be to activate the validator if a certain button is pressed (instead of any button on the form). Would that be possible? Thanks

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >