Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

SQL INsertion problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lars - 14 Feb 2008 03:32 GMT
Hi

I have the following problem. I want to add the following text in a FormView
for adding links easaly to the database I have on  my homepage. But I get an
error about possible string insertion. When enter the string from the ID
every thing goes fine. If I view the field in a DataLost it outputs as the
HTML code I want but when I use a FormView or DetailsView I get the HTML
code written on the screen. What am I doing wrong, how do I insert SQL
commands to a database and then select them and print them out as HTML code
in the outprinted aspx file at the client and not HTML code in the browser.

I do use Parameterised values. Some how I must make sure to convert the
illegal characters to HTML excape sequences and then back again. How is this
done?

Here's the string I want to use

<p align="center"><a
href="http://www.rosoft.se/private/music/lrband/eget/100_Funky_12.mp3">100_Funky_12.mp
3</a></p
>

Yours
Lars

BTW
It's my own music.
Misbah Arefin - 14 Feb 2008 07:27 GMT
to convert html to escape sequences you need to encode/decode it you can use
Server.HtmlEncode and Server.HtmlDecode functions

Signature

Misbah Arefin

> Hi
>
[quoted text clipped - 21 lines]
> BTW
> It's my own music.
Lars - 14 Feb 2008 14:17 GMT
Hi

When I think about it the problem is probably not ASP.NET. I would guess the
problem is defandant of the SQL Database. In this case SQL Express. Does any
one know how to add escape characters to SQL fields in SQL Express. Similar
to what you do in C/C++ as "This is a string with double quotes \" backsladh
\\ and line feed \n".

Can I write a Jaca Script function that converts this and then call that
function in stead of Eval("HTM")?

Lars

> to convert html to escape sequences you need to encode/decode it you can
> use
[quoted text clipped - 31 lines]
>> BTW
>> It's my own music.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.