473,657 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL INsertion problem

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.mp 3">100_Funky_12 .mp3</a></p>

Yours
Lars

BTW
It's my own music.


Feb 14 '08 #1
2 1112
to convert html to escape sequences you need to encode/decode it you can use
Server.HtmlEnco de and Server.HtmlDeco de functions

--
Misbah Arefin

"Lars" wrote:
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.mp 3">100_Funky_12 .mp3</a></p>

Yours
Lars

BTW
It's my own music.


Feb 14 '08 #2
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
"Misbah Arefin" <Mi**********@d iscussions.micr osoft.comskrev i meddelandet
news:03******** *************** ***********@mic rosoft.com...
to convert html to escape sequences you need to encode/decode it you can
use
Server.HtmlEnco de and Server.HtmlDeco de functions

--
Misbah Arefin

"Lars" wrote:
>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.mp 3">100_Funky_12 .mp3</a></p>

Yours
Lars

BTW
It's my own music.



Feb 14 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
3858
by: Patrick Guio | last post by:
Dear all, I have some problem with insertion operator together with namespace. I have a header file foo.h containing declaration of classes, typedefs and insertion operators for the typedefs in a named namespace namespace foo { class Foo
10
2724
by: Anton.Nikiforov | last post by:
Dear all, i have a problem with insertion data and running post insert trigger on it. Preambula: there is a table named raw: ipsrc | cidr ipdst | cidr bytes | bigint time | timestamp Triggers:
5
6051
by: John N. | last post by:
Hi All, Here I have a linked list each containing a char and is double linked. Then I have a pointer to an item in that list which is the current insertion point. In this funtion, the user hits the right and left keys to move this insertion point (cursor) Here is the problem:
4
1583
by: Andrix | last post by:
Hi, I have a table with 20.000.000 of tuples. I have been monitoring the performance of the insertion and updates, but not convince me at all. The table have 30 columns, what and 12 of it, are calcultated column. The test that i do was this: 1 Insertion with all the columns and calculing the calcultated columns in the insertion sentence.
3
1496
by: Franco Perilli | last post by:
I've compiled this code and no problems, but when I run the program, it prints only the last entry i've inserted. Looks like a problem in the sorted insertion algorithm. Can u help me plz? #include <stdio.h> #include <stdlib.h> /*---data type---*/ typedef int type; /*---------------*/
6
16127
by: Julia | last post by:
I am trying to sort a linked list using insertion sort. I have seen a lot of ways to get around this problem but no time-efficient and space-efficient solution. This is what I have so far: struct node { int x; struct node *next; };
2
7366
by: B. Williams | last post by:
I have an assignment for school to Overload the operators << and >and I have written the code, but I have a problem with the insertion string function. I can't get it to recognize the second of number that are input so it selects the values from the default constructor. Can someone assist me with the insertion function. The code is below. // Definition of class Complex #ifndef COMPLEX1_H
1
2001
by: teo | last post by:
Hallo, I'm performing a mass insertion from a text file to a db table with AdoNet commands, like this: myCommand.CommandText = "BULK INSERT ..." from a Win form no problem
5
2604
by: phiefer3 | last post by:
I'm currently a student, but this problem isn't directly related to what I have to do on an assignment. It's just a problem I've had with some supporting features. First of all, I'm using MSVS 2005 standard edition. I haven't downloaded or acquired any additional libraries or tools, just what gets installed with the studio by default. Also, I'm using C++ and started the problem projects as an empty CLR project. Currently I've had several...
9
2059
by: python_newbie | last post by:
I don't know this list is the right place for newbie questions. I try to implement insertion sort in pyhton. At first code there is no problem. But the second one ( i code it in the same pattern i think ) doesn't work. Any ideas ? ------------------------------------------------------------ def insertion_sort(aList): for i in range(len(aList)): for j in range(i):
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.