473,795 Members | 2,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to store only imagefile name in database table

11 New Member
hi
i m using radiobuttonlist with images like this
Expand|Select|Wrap|Line Numbers
  1. <asp:RadioButtonList ID="rbtnthumb1"   runat="server">
  2.     <asp:ListItem  Value ="News_icon.jpg"> 
  3.         <img src="http://bytes.com/images/News_icon.jpg" alt="News" align="absmiddle"> 
  4.         News
  5.     </asp:ListItem>
  6.     <asp:ListItem  Value ="imageicon.bmp">
  7.       <img src="http://bytes.com/images/imageicon.bmp" alt="Image" align="absmiddle">
  8.       Image
  9.     </asp:ListItem>
  10.     <asp:ListItem Value ="Video97.gif" >
  11.       <img src="http://bytes.com/images/Video97.gif" alt="Video" align="absmiddle">
  12.       Video
  13.     </asp:ListItem>
  14. </asp:RadioButtonList>
In design view it show radiobuttonlist with images but when i use insert query.it stored this value in mytable
Expand|Select|Wrap|Line Numbers
  1. <img src="http://bytes.com/images/News_icon.jpg" alt="News" align="absmiddle"> 
  2. News
but i only want to store News_icon.jpg(i mage file name)and i m using this way for adding value
Expand|Select|Wrap|Line Numbers
  1.         cmd.Parameters.AddWithValue("@ChooseThumbnail", rbtnthumb1.SelectedItem.Text)
please let me know how to store only imagefile name in database table

regard's
Nov 11 '09 #1
2 2458
Frinavale
9,735 Recognized Expert Moderator Expert
Well, your application is doing exactly what you told it to do.

It's taking the "Text" property of the SelectedItem... and this happens to be the HTML for the Image along with the Text that you are displaying for the item.


What you should be using is the RadioButtonList 's SelectedValue property instead.

Happy coding,

-Frinny
Nov 11 '09 #2
gm000
11 New Member
thanks for guiding its working
Nov 12 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2675
by: Christopher Brandsdal | last post by:
Hi! I have a delicatg problem.... I have made a registration form for adding my friends information in a database. The problem is that I want to connect the persons with companies in the same database. I wonder how i could connect a person to several other id's in a table. I wonder if I can make a string in the database that holds all the id's separated with , for example....?
5
2931
by: Roy Gourgi | last post by:
Hi, I am used to working in Visual FoxPro and I would like to be able to create a database and store and retrieve information from it. What is the simplest way to do it and what should I be using as there are many choices to choose from. My database will contain a lot of records. TIA
11
4381
by: c676228 | last post by:
Hi everyone, I am just wodering in asp program, if there is anybody writing store procedure for inserting data into database since there are so many parameters need to be passed into store procedure(assume there are many columns in the table). I need to insert data into two separate tables, the relation between these two tables is 1 row of data in table1 could have multiple rows in table2 related to table1, but if the data insertion into...
4
16705
prabunewindia
by: prabunewindia | last post by:
Hello everybody, here i am going to explain, how to get mails from Outlook express database and store in our own database(local) Initially you have to add the refference Outlook library10.0 or 11.0 from add ref. If you not find that, download the dll from here and install..click here open and windows application (or ASP.NET) in Form1 class code(declare) the following,
3
2349
by: M.-A. Lemburg | last post by:
On 2008-08-07 20:41, Laszlo Nagy wrote: 1 It also very fast at dumping/loading lists, tuples, dictionaries, floats, etc. -- Marc-Andre Lemburg eGenix.com
4
1855
elen
by: elen | last post by:
hi! I wish for your help! I have a form and i want to store the results to my database and show me back what i sent to database,but my php script won't work.Can somebody help me ?I'm new in php This is my html code for a form: <html> <head> <title>ΦΟΡΜΑ ΣΤΟΙΧΕΙΩΝ ΤΑΥΤΟΤΗΤΑΣ ΑΣΘΕΝΟΥΣ</title> </head> <body bgcolor='fffaaa'>
2
3303
by: jelle79 | last post by:
Hi all, I'm storing all kind of data stored in objects. Now I want to query my data-source. And I thought LINQ is the right thing for it. Data is stored like: store.Database Queries like this work:
2
5000
by: Silfheed | last post by:
Heyas So I've been messing around with the PIL and PNG's and came across a little problem with PNG's. So just to clarify, I'm running with the standard ubuntu 8.04 python- imaging package that installs zlib and all the other goodies that go along to make the PIL work with PNG's nicely. So this works fine:
8
2180
by: ahilar12 | last post by:
Hi experts, I have a form with many textboxes,listboxes in php.I have a edit button to edit the values in the form.once i click the edit button the existing values should be displayed so that the user can edit those particular values and also that should be updated in the mysql database.kindly reply me as early as possible. Thanks
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10443
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10002
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
9044
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
7543
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
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4113
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
3728
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.