Search code examples
c#textboxcaret

Caret position C# webform


I'm having trouble changing the position of the caret in my textboxes, on a C# webform. I've tried several different ways of using the SelectionStart setting but everytime it says ...WebControls doesn't have a definition for SelectionStart. Any ideas??


Solution

  • I believe SelectionStart is only available for System.Windows.Forms.TextBox. Use this set of properties for System.Web.UI.WebControls.TextBox