Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6909193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:39:31+00:00 2026-05-27T08:39:31+00:00

I have been trying to develop some user controls, one being a text edit

  • 0

I have been trying to develop some user controls, one being a text edit control in which I set the MaxLength attribute of an ASPxTextBox control. This would seem fairly straight forward to me but VS2010 doesn’t seem to like it.

The script behind me user control is as follows

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FieldEditTextMedium.ascx.cs" Inherits="COGS.Controls.DataControls.FieldEditTextMedium" %>
<link rel="Stylesheet" href="../../CSS/FieldIndicators.css" type="text/css" media="screen" />
<table><tr><td class="FieldHeader">
    <dx:ASPxLabel CssPostfix="CogsForm" ID="TextHeaderLabel" runat="server" OnLoad="Header_Load" Text='<%= this.HeaderTitle %>'/>
</td><td class="FieldEdit">
    <dx:ASPxTextBox
        ID="TextValueEdit" 
        runat="server"
        Text='<%= this.FieldValue.ToString() %>' MaxLength='<%= this.MaxChars %>' />
</td></tr></table>

When I attempt to implement it I add the control to the web.config but it will not appear using intellisense however when I remove the MaxLength attribute from the code my user control will appear as normally expected.
This implies to me that this deceleration is causing an error and the control is failing to compile… or something like that. I am assuming it is something to do with using an integer as it works fine with strings.

At present I use a bit of javascript to set the maxlength on init as this doesn’t seem to cause any issues but to me seems like more work than necessary.

Also when I say it will “appear” this is usually after some messing around with closing and re-opening documents and re-building the solution which I find very frustrating.
If anyone can also provide info on how to best handle the refresh of user controls in intellisense I would be most grateful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:39:32+00:00Added an answer on May 27, 2026 at 8:39 am

    Normally, setting a control’s properties declaratively with “<%= %>” is not valid. You might try setting them from code behind (or perhaps with a databinding expression, if it’s appropriate: <%# %>)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HI, I am trying to develop a form which has some user controls ,
I have been trying to develop a peer to peer application that uses Micosoft's
I have been trying to develop a Java ME application using WTK 2.5.2 (Java
For the last three days I have been trying to develop a web based
I've been trying to develop my own text editor through a eclipse plugin. I
I have been trying to develop an application in a landscape mode so I
I have been trying to make sense of some claims that Appcelerator Titanium makes.
I've been trying to get some features developed for my app which I don't
I have been trying to develop a 3D data-visualization software, and now I need
int duplicate (int cards[5][4][13]) I have been trying to develop a function (the prototype

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.