The issue I am having is that when I create a multiline textbox, it prepends
(carriage return line feed) characters.
I am using .NET 4.5. I created an empty project with just a multiline textbox:
<asp:TextBox ID="txtTest" runat="server" TextMode="MultiLine" Rows="5" Columns="50"></asp:TextBox>
In firefox and chrome it renders as:
<textarea name="txtTest" rows="5" cols="50" id="txtTest">
</textarea>
In IE, it is fine.
Thank you in advance.
Like jmoreno suggested, changing
controlRenderingCompatibilityVersion=4.0
to
controlRenderingCompatibilityVersion=4.5
in web.config helped me.
this is fixed in .NET 4.5 RTM version. Are you using 4. RC? Connect issue fixed in RTM
The initial leading newline (LF or CRLF) of a textarea is ignored.
IE 8 and other older browsers (e.g. Firefox 3) remove the leading newline after parsing character entities.
However newer browsers removing the leading newline before parsing character entities, which then get interpreted as part of the default value of the textarea.
I don't know why .NET would generate those character entities.
Related
when I use a single view file with uni-code in it, it shows the the content correctly but when I make a layout and extends with it from another page it doesn't show the uni-code character it shows ????
#extends('layouts/custom_layout.blade')
Check what encoding is used in your other view. Convert it to UTF-8 and it will work fine.
To avoid encoding related problems, use popular IDEs or text editors like Sublime Text or Notepad++ for editing files.
In custom_layout.blade.php file:
````
<div class="container">
<div class="content">
<div class="title">Laravel 5</div>
गृह
</div>
</div>
````
In home.blade.php file:
#extends('custom_layout')
And off course I have used meta tag charset="utf-8" in head tag.
My friend I had the same problem with the unicode characters it turns out that the IDE was causing the problem , I use Jetbrains PHPStorm. I edited the file with sublime and it turns alright.
I have this line of HTML
<input id="checkVSC" type="checkbox" checked data-toggle="toggle" name="checkVSC"
data-onstyle="info" data-offstyle="default" data-size="small"
data-on="<i class='icon icon-checkmark'></i> VSC"
data-off="<i class='icon icon-line-plus'></i> VSC">
for the data-on it gives me the green squiggly line saying: "If the attribute value is enclosed in quotations marks, the quotation marks must match"
This isn't a major item, but when I do Ctrl-K Ctrl-D to re-format the lines of code to make them neat and pretty it adds a ">" to the data-on attribute.
<input id="checkVSC" type="checkbox" checked data-toggle="toggle" name="checkVSC"
data-onstyle="info" data-offstyle="default" data-size="small"
**data-on="><i class='icon icon-checkmark'></i> VSC"**
data-off="<i class='icon icon-line-plus'></i> VSC">
Any one have any idea as to what is going on here and why it is doing what it is doing?
VS gets fooled because your HTML is invalid.
Attribute strings should be escaped:
data-on="<i class='icon icon-checkmark'></i> VSC"
data-off="<i class='icon icon-line-plus'></i> VSC">
To avoid such situations in the future You might try to:
enable HTML validation
try any online validator
Some other IDEs and text editors provide automatic validation and even automatic escaping as well.
In VS 2012 and earlier i was able to press CTRL+K, CTRL+D which would change
<div>
<div>
<asp:TextBox runat="server" Id="Textbox1"></asp:/TextBox>
</div>
</div>
to
<div>
<div>
<asp:TextBox runat="server" Id="Textbox1"></asp:/TextBox>
</div>
</div>
So it would remove the extra lines. In VS 2013 when i do the same it doesn't format it correctly (or in the way i prefer).
I've looked under Tools but nothing that i can see that would sort the issue, i also have Productivity Power Tools installed and again no option to remove the extra lines.
Anyway around this?
Edit 1
using \n\n and \n
Under Windows, line endings are \r\n. To search for blank lines, search for ^\r\n with regular expressions on and replace with a blank string.
Note: the Replace... shown is an empty string placeholder.
ckeditor is behaving strange to me as it adds a backslash to span tag when the content is added.
For example:
<span style=\"color:#006400;\"><span>this is a comment......Must be green, but it is white</span></span>
But it should be like this:
<span style="color:#008000;">this is a comment......Must be green, but it is white</span></span>
Why is this happening so?
This problem occurs LIVE not on local machine(localhost).
This is a problem related with your hosting service. For security reasons, they add a backslash before every quote and doublequote. To solve it you can use the stripslashes function in PHP:
stripslashes($_POST['comment'])
Is it possible to make a Telerik RadEditor single-line entry only?
For example, in an ASP TextBox there is the Multiline attribute
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" />
Ah, just figured it out...
It's a bit weird, but there is an attribute for NewLineBr in the RadEditor.
<telerik:RadEditor NewLineBr="false">
Single line editing not possible with the RadEditor. It always uses an iframe element for the content area where the asp:textbox uses a textarea/input. Even if you make the height of the iframe be a single line, when the user presses Enter, they will get a new line. If you need a single line input from Telerik, then you can try using the RadInput control.