Formatting of #HtmlTextBoxFor MVC Visual Basic Webpage - asp.net-mvc

This is my first post here although I use this forum all the time and it usually provides me with a solution, however I've searched all over the web for an answer to this and I can't find anything.
I'm developing a website which provides software support. Users log on to it and add a "support call" which a member of a support team will answer.
The problem I am facing is that when users describe their problem (inside the TextBoxFor shown below), they can type out their problem, and format the text as they please, however when the call is submitted, sometimes (it appears randomly) the formatting just disappears, e.g. some spacing and paragraph use just disappears, here is an example:
Correct formatting:
Hi I'm having difficulty with x, and y and I need some assistance.
Could somebody help me out?
How it appears sometimes:
Hi I'm having difficulty with x,and y and I need some assistance.Could somebody help me out?"
This, of course is highly simplified, and some people have to write many paragraphs and text lines.
Here is the code for the textbox (in the view):
#Html.TextBoxFor(Function(model) model.SupportCall.Subject, New With {.maxLength = "254", .style = "width:500px;"})
It is worth mentioning that when a support call is submitted, it goes to a folder which is picked up by another internal piece of software, which then creates a database record for the call, meaning that an email notification can be sent to the support team, then the list of calls to be answered is updated from that database model, therefore I'm pretty sure it's possible that this process could be what is changing the text formatting.
A reason why this is happening is just as useful as a solution to me so any input is welcome.

use
<pre></pre>
prepend and append it.

Related

How do you add linked text to a description in Asana?

There is a similar question here but the person answering said it is not possible. I have to believe he did not understand the question...
So I apologize for asking again... I can paste an entire url into a description field in asana and it will render as a link. But I can't figure out how to shorten it to something like short text or [short text](myurl)
Unfortunately, he's right: we don't let there be different text for the link than the text in the url, so it's not possible to have a link to short text, only things like http://myurl.com. This is somewhat mitigated by the fact that we'll truncate the url when displaying in an Asana text box (it will run on for some characters, then terminate with "..."), so extremely long urls shouldn't cause too many text layout issues. This is enforced at render time, so there's not a way to do this with the API either.
There are a number of reasons for this - security, as he mentioned, is one; more clarity is better here. We've got some customers that don't want to enable, for instance, <a href="http://hijacker.com/pwned">example.com<\a> links that their non-technical users might encounter without thinking about it - basically, they don't want the same level of paranoia in Asana as is required to be a responsible email user, so we went WYSIWYG here.
I'd be interested, however, if you could come up with a compelling use case for why this is necessary. We're always up for getting feedback!

How do I retain a fixed drop down value in creating a link for submit?

I am new to the community and I am in no way an advanced programmer. I am a support in a company and would like to make our job easy in any way I can. In regards to this, could you please help me with my problem?
I have created a link wherein I want to automatically disable a program, but to do so, all values must be present. And in order to do that, I have to inspect the elements of the page and include each item in the link I am making. Here is an example below.
(WEBSITE)frmTarget=PROGRAM&frmOption=EDIT&program_ident=xxxxx&status=D&labor_console_mode=D
With the link provided above, the labor_console_mode part is what I want to retain. Each program_ident has a different value when it comes to the labor_console_mode part; sometimes it has A value, sometimes it has C value. My question is, how do I retain the value of the labor_console_mode part without changing its value in the link and being able to submit the whole URL.
Let us say:
C=Scheduled
A=Auto
D=Disabled
Something like, labor_console_mode=selected is what I thought would work but it didn't. If I remove it from the equation, the page loads saying that the labor_console_mode is missing. It frustrates me as to why I cannot find any answers online or if I am wrongly searching for the phrase. Please help me. I would greatly appreciate any help I can get regarding this matter.
Thank you!

Only have to enter first word with Recaptcha

I'm using Google's Recaptcha control, using MVC Recaptcha. The MVC Recaptcha component wraps the Google Recaptcha control. For some reason, the control allows the first word to be entered only, but the second word can be missing and incorrect, and this works fine. Not in all cases, but I have noticed it in one area of the application.
Any idea why this might be happening?
From http://www.google.com/recaptcha/learnmore
"The user is then asked to read both words. If they solve the one for
which the answer is known, the system assumes their answer is correct
for the new one. The system then gives the new image to a number of
other people to determine, with higher confidence, whether the
original answer was correct."
"Currently, we are helping to digitize old editions of the New York Times and books from Google Books."
This is normal operation for recaptcha.
It uses one word that it knows for sure what it is and one word which it wants you to translate for it.
The most "everyday" word is normally the one you have to get correct and the weird word you can pretty much type anything in there.
Its looking to build a pool of answers and then out of all the translations given it will pick the most common answer to go in its official translation dictionary.
If you read up on the website you will see that it is part of a digitization project to convert books into electronic versions.

How do Google opening links in a new window without target attribute?

i wonder how google manages to open external links in a new window/tab without defining target="_blank".
For example in google plus, all external links open in a new window.
I think its some Javascript voodoo but the .js code is obfuscated so i cant really look into.
edit: oh and followup question: why?
Using a framework makes this easy. Just have JavaScript look for links marked rel="external", or another identifier that shows them to be an external link, and dynamically add target="blank". Here's an example using Prototype:
$$('a[rel="external"]').each(function(a) {
a.setAttribute('target', '_blank');
};
It's not beyond reasoning for them to add the target attribute by javascript before allowing the anchor link event to return true.
It's Javascript. You can say:
window.open('http://example.org', '_blank').focus();
But please, don't. Opening links in new windows is almost always the wrong thing to do. Seriously, good uses of this are vanishingly few. If users want a link opened in a new window, they are quite capable of doing that themselves.
Jakob Nielsen was telling people this twelve years ago. Others have taken up the cudgels. The W3C removed the target attribute from HTML 4 because it was such a bad idea. I honestly don't understand how this usage persists. Don't you find it incredibly annoying when a website does this to you? Why would you want to write a website which does this to someone else?
Which brings me to your followup question. Why did Google decide to do this? I have no answer to that, and i am completely and utterly baffled how one of the very biggest, brightest, web companies could make such an elementary mistake. But then, a lot of the Google Plus interface has very poor usability (as in, mostly worse than Facebook poor); i suspect there is an interesting story behind it. Was the project under-resourced, and thus built cheaply on top of a rapid development framework such as GWT? Was it built as a spare time project by a lone wolf with a blind spot for web architecture? Was it driven by strategy wonks who didn't care about getting the technology right? Mystery.

How to get rid of stupid "pad" labels produced by RTML functions?

I am unlucky to be in charge of maintaining some old Yahoo! Store built using their RTML-based platform.
Recently I've noticed that HTML code generated by some RTML functions is sprinkled all over with "padding images" (or whatever is the conventional name for those 1x1 pixel images used to enforce layout). I have nothing against using such images, but... all those images are supplied with an ALT attribute like this:
<img href="http://.../image1x1.gif" alt="pad">
With all due respect to the original authors of RTML, but they must have been smoking something when they came up with this "accessibility enhancement"... :-(
Anyway, here are my questions:
Does anybody know a list of all RTML functions that generate HTML with all these "pad" images?
Is there any way to get rid of all those alt="pad" attributes without rewriting a lot of RTML code?
NB: This may sound a little cynical, but improved accessibility is not the main goal here. The main goal is to stop exposing those moronic alt="pad" attributes to Google and other smart search engines. So client-side scripting is not going to help, as far as I know.
Thank you!
P.S. Probably, most of you are really lucky and never heard of RTML. Because if somebody would establish a prize for software products based on
commercial success
------------------
usability
ratio, this RTML-based "platform" would probably win the first place.
P.P.S. Apparently someone from Yahoo! finally listened, because I can no longer find those silly "pad" tags in the RTML generated for our store. Nevertheless, one of the ideas offered in response to my original question does provide a very practical solution - not just to the original problem but to any similar problem with RTML platform. See the winning answer - it's really good.
The only way I see is to have your own website front-end that will filter whatever you want from the RTML site....
for example, your rtml site is at http://rtmlusglysite.yahoo.com/store/XYZ01134 , you could host a simple PHP front-end at http:://www.example.com that would be acting like a "filtering" HTTP web proxy, so http://rtmlusglysite.yahoo.com/store/XYZ01134/item1234.rtml would be accessed by http://www.example.com/item1234.html
It's not an ideal solution, but it should work, and you could do some more fancy stuff.
Nice try from the other posters, but there is a very simple RTML command that will do it. . .
TEXT PAT-SUBST s GRAB
MULTI
HEAD
BODY
TEXT #var-with-alt-tag-equals-pad-in-it
frompat "alt=\"pad\""
topat ""
The above RTML will find all instances of alt="pad" and replace it with nothing.
Well you're right on RTML being relatively untraveled :)
Do you have a way to add your own attributes to these images tags? If so, would it be possible to override the alt attribute? If you specify alt="", I would think that would override Yahoo's... Otherwise consider putting a useful alt tag in there for the blind and dialup types.
It's the first time I'm hearing about this platform, but here is an idea: if you can add javascript to the pages, you could write a function that will run after the page has loaded and remove all the alt="pad" attributes from the page.
Unfortunately this solutions works only with browsers that know about scripting, so lynx or some other text based browsers might not support it.
I have shared a link official RTML guide from yahoo. Hope it will help. Thanks!
List of available RTML books and resources

Resources