Connecting Tech Pros Worldwide Forums | Help | Site Map

Is there a character limit on bound controls?

pedalchick
Guest
 
Posts: n/a
#1: Aug 25 '06
I'm trying to build a mini-CMS for a friend (ASP.NET 2.0/VB) - just a
simple admin page w/ a text box and button that inserts some text into
a database (I'm using Access 2003 - text is going into a Memo field)
that will subsequently be fed to a page to display. The insert works
just fine - I've put more than 1,000 characters in without incident.
However, on the page that needs to display the text, the text is
truncated to about 200 characters.

On the display page I have my Access datasource that is pulling the
last updated record from the database. Then, I have tried a "details
view" and a Form View with the text bound to a label inside an item
template. In either case, the text is truncated.

More info: The text will contain basic HTML tags. In the form view,
the HTML is rendered properly, but in the details view it was coming
out as text tags. The truncation happens regardless of whether there
are tags or not.

I'm sure there's a simple solution, but I've looked through all the
properties on the controls and can't find anything that might be
limiting the length of the text.

Please help.

TIA,
Laura


Marina Levit [MVP]
Guest
 
Posts: n/a
#2: Aug 25 '06

re: Is there a character limit on bound controls?


No, there is no limit.

Are you sure all 1000 characters are going into the database? Just because
there is no error, doesn't mean they all went into the database.

"pedalchick" <pedalchick@hotmail.comwrote in message
news:1156513245.139684.59540@p79g2000cwp.googlegro ups.com...
Quote:
I'm trying to build a mini-CMS for a friend (ASP.NET 2.0/VB) - just a
simple admin page w/ a text box and button that inserts some text into
a database (I'm using Access 2003 - text is going into a Memo field)
that will subsequently be fed to a page to display. The insert works
just fine - I've put more than 1,000 characters in without incident.
However, on the page that needs to display the text, the text is
truncated to about 200 characters.
>
On the display page I have my Access datasource that is pulling the
last updated record from the database. Then, I have tried a "details
view" and a Form View with the text bound to a label inside an item
template. In either case, the text is truncated.
>
More info: The text will contain basic HTML tags. In the form view,
the HTML is rendered properly, but in the details view it was coming
out as text tags. The truncation happens regardless of whether there
are tags or not.
>
I'm sure there's a simple solution, but I've looked through all the
properties on the controls and can't find anything that might be
limiting the length of the text.
>
Please help.
>
TIA,
Laura
>

pedalchick
Guest
 
Posts: n/a
#3: Aug 25 '06

re: Is there a character limit on bound controls?



Marina Levit [MVP] wrote:
Quote:
No, there is no limit.
>
Are you sure all 1000 characters are going into the database? Just because
there is no error, doesn't mean they all went into the database.
>
"pedalchick" <pedalchick@hotmail.comwrote in message
news:1156513245.139684.59540@p79g2000cwp.googlegro ups.com...
Quote:
I'm trying to build a mini-CMS for a friend (ASP.NET 2.0/VB) - just a
simple admin page w/ a text box and button that inserts some text into
a database (I'm using Access 2003 - text is going into a Memo field)
that will subsequently be fed to a page to display. The insert works
just fine - I've put more than 1,000 characters in without incident.
However, on the page that needs to display the text, the text is
truncated to about 200 characters.

On the display page I have my Access datasource that is pulling the
last updated record from the database. Then, I have tried a "details
view" and a Form View with the text bound to a label inside an item
template. In either case, the text is truncated.

More info: The text will contain basic HTML tags. In the form view,
the HTML is rendered properly, but in the details view it was coming
out as text tags. The truncation happens regardless of whether there
are tags or not.

I'm sure there's a simple solution, but I've looked through all the
properties on the controls and can't find anything that might be
limiting the length of the text.

Please help.

TIA,
Laura
Yes - I can open Access and see everything. I just put text + spaces,
no special characters...
The text is being truncated to 225 characters.

Here is the display page code (my latest attempt)
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master"
Title="Untitled Page" %>
<script runat=server>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

AccessDataSource1.SelectParameters.Item("event_id" ).DefaultValue =
ConfigurationManager.AppSettings("event_id")

End Sub
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/database/FC1.mdb"
SelectCommand="SELECT MAX([stage_num]), [event_id],
[stage_overview] FROM [tblStage] WHERE ([event_id] = ?) and
[stage_overview] IS NOT NULL GROUP BY [event_id], [stage_overview]">
<SelectParameters>
<asp:Parameter Name="event_id" Type="Int32" />
</SelectParameters>
</asp:AccessDataSource>
<br />
<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="AccessDataSource1">
<ItemTemplate>
<asp:Label ID="lblOverview" CssClass=default runat="server"
Text='<%# Bind("stage_overview") %>' />
</ItemTemplate>
</asp:Repeater>
</asp:Content>

Marina Levit [MVP]
Guest
 
Posts: n/a
#4: Aug 25 '06

re: Is there a character limit on bound controls?


When you look at the generated HTML, does it still have just 225 characters?
Do you have more then one item in your repeater, and every one is just 225?
Are any of the characters special HTML characters that your text contains
that could be messing it up?

Also, try a textbox instead of a label.

225 in general does not have any significance, as far as I know.

"pedalchick" <pedalchick@hotmail.comwrote in message
news:1156515626.169193.321780@m73g2000cwd.googlegr oups.com...
Quote:
>
Marina Levit [MVP] wrote:
Quote:
>No, there is no limit.
>>
>Are you sure all 1000 characters are going into the database? Just
>because
>there is no error, doesn't mean they all went into the database.
>>
>"pedalchick" <pedalchick@hotmail.comwrote in message
>news:1156513245.139684.59540@p79g2000cwp.googlegr oups.com...
Quote:
I'm trying to build a mini-CMS for a friend (ASP.NET 2.0/VB) - just a
simple admin page w/ a text box and button that inserts some text into
a database (I'm using Access 2003 - text is going into a Memo field)
that will subsequently be fed to a page to display. The insert works
just fine - I've put more than 1,000 characters in without incident.
However, on the page that needs to display the text, the text is
truncated to about 200 characters.
>
On the display page I have my Access datasource that is pulling the
last updated record from the database. Then, I have tried a "details
view" and a Form View with the text bound to a label inside an item
template. In either case, the text is truncated.
>
More info: The text will contain basic HTML tags. In the form view,
the HTML is rendered properly, but in the details view it was coming
out as text tags. The truncation happens regardless of whether there
are tags or not.
>
I'm sure there's a simple solution, but I've looked through all the
properties on the controls and can't find anything that might be
limiting the length of the text.
>
Please help.
>
TIA,
Laura
>
>
Yes - I can open Access and see everything. I just put text + spaces,
no special characters...
The text is being truncated to 225 characters.
>
Here is the display page code (my latest attempt)
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master"
Title="Untitled Page" %>
<script runat=server>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
>
AccessDataSource1.SelectParameters.Item("event_id" ).DefaultValue =
ConfigurationManager.AppSettings("event_id")
>
End Sub
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/database/FC1.mdb"
SelectCommand="SELECT MAX([stage_num]), [event_id],
[stage_overview] FROM [tblStage] WHERE ([event_id] = ?) and
[stage_overview] IS NOT NULL GROUP BY [event_id], [stage_overview]">
<SelectParameters>
<asp:Parameter Name="event_id" Type="Int32" />
</SelectParameters>
</asp:AccessDataSource>
<br />
<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="AccessDataSource1">
<ItemTemplate>
<asp:Label ID="lblOverview" CssClass=default runat="server"
Text='<%# Bind("stage_overview") %>' />
</ItemTemplate>
</asp:Repeater>
</asp:Content>
>

pedalchick
Guest
 
Posts: n/a
#5: Aug 25 '06

re: Is there a character limit on bound controls?



Marina Levit [MVP] wrote:
Quote:
When you look at the generated HTML, does it still have just 225 characters?
Do you have more then one item in your repeater, and every one is just 225?
Are any of the characters special HTML characters that your text contains
that could be messing it up?
>
Also, try a textbox instead of a label.
>
225 in general does not have any significance, as far as I know.
>
Hello Marina,
It doesn't matter what the control is - text box, label, gridview,
detail view: it always comes up truncated. I've never come up against
this problem before. It seems like the truncation must be occuring
when I retrieve the data from the database. It may be a MS Access
issue, but I have never had this problem before...

Closed Thread