.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Putting text right to product image

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net

Cart contains product image and long multi line product description.
Description should be placed right to product image with word wrap. I tried

<img alt="" src="<%= Url.Action("MainImage", "Store", new { id = Server.UrlEncode(Model.Contents) } )%>" />
<div style="vertical-align: middle">
<%= Model.Description %>

But right side image is empty, description starts in bottom line:

iiiiiiiiiiiiii  descrioption description description
description description description

How to force description to be centered in right of image:

iiiiiiiiiiiiii  descrioption description description
iiiiiiiiiiiiii  description description description

View Complete Post

More Related Resource Links

Built-in Functions - Text and Image Functions in SQL Server

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Future versions of SQL Server will not support TEXT, NTEXT and IMAGE data types. Columns with TEXT / NTEXT data type do not support commonly used string functions such as LEN, LEFT, RIGHT, etc. Furthermore, due to the large size of TEXT data you''re likely to see performance issues if you store such data in the database. However, at times you can''t help but use the TEXT / NTEXT / IMAGE data types (for example when supporting 3rd party databases when you cannot change the schema) - this is when text and image functions come in handy.

Built-in Functions - Text and Image Functions

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Putting a text box in typeover mode.


  I am using VB ASP.NET in Visual Studio 2008.  I would like to put some textboxes in typeover mode so that the user will not have to erase what is there before typing in the new text.

  Is there a way to do this?  If so, please direct me to the code examples or give me the code that can do this.

  Thank you for your time.

putting carriage return/line feed in non-HTML email text

Using vb.net/asp.net 2005I am trying to create a string message for an email that I am sending out from my asp.net page like so: For Each dr In dtDataTable.Rows strMessage = strMessage & vbCrLf & vbCrLf & Environment.NewLine & dr.Item("UserName") & Environment.NewLine Next so I am looping through a datatable and getting each name from each row, that is working well but when I get the email it appears in my inbox with all the names mashed together, you see I am trying both vbcrlf and newline but looks like neither is workingdoes anyone know what I'm doing wrong?

How to convert both text and image into image

Hi, Here is a question. how to convert both text and image together into an image. To clarify my question I can say if I have a text editor where I can add both text,image,audio or video player, how can I convert the whole texteditor.text (it gives me html code) to an image and save it in a file. I will be highly pleased with your answer. Help me please. Thank you. 

Overlay Image in InfoPath with text field

Hi, We are currently designing a simple test for some employees to take and it will be delivered via InfoPath forms services. Upon successful completion of the test the userr will be invited to click a button to view (then print) their certificate. The certificate has been received as a .jpg. Is there any way to overlay the image with a text box, as this would enble the user to print a certificate where their name appears on it.

How to Use Image and Text in CommandField

 Hello, I have a CommandField with an edit button.  I want to be able to use an image for the edit, but text for the update and delete buttons.  I can't figure out how to use both.  Here is the CommandField:  <asp:CommandField ShowEditButton="true" ButtonType="Image" EditImageUrl="~/Images/pencil.gif" HeaderText="Edit" />  

How to create a button with image and text


Currently I have button on a form and I need to make buttons image but maintain the click event functions that they have. For instance I have a button that says Update. Is there a way to add an image and put text in that image that says Update and maintain it's functionality. here is the code for the button:

<asp:Button ID="btnUpdate" runat="server" Text="Update" Visible="False" />


How to save WPF RichTextBox content (text + image) to the database



I want to save (and after that also to retrieve) the content of an WPF RichTextBox (text + image) to/from the database.

I found this: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/750a654e-b002-4742-8f46-609e93f6ec81 but like the author said, the solution seams not to work for text with image - the image is ignored/removed and only the formatted text is saved and after that retrieved to/from database.

Know someone a solution about this issue?

Best regards,





C# Snippet Tutorial - How to Draw Text on an Image

In this snippet tutorial we're going to be adding on to our series of C# image editing tutorials. This tutorial is going to provide the code required to do basic text drawing including anti-aliasing and text alignment.

For more information on C# image editing, check out our previous two tutorials: C# Tutorial - Image Editing: Saving, Cropping, and Resizing and C# Tutorial - Image Editing: Rotate.

Ok, let's get started. The first thing we need to do is get a Bitmap object from an image file.

Bitmap myBitmap = new Bitmap("C:\\myImage.jpg");

Now that we have a Bitmap object we can get a Graphics object from it. The Graphics object will be doing all of our text drawing.

Can a gridview contain an image and text in the same column?


I have a 1-column gridview (and it must remain 1-column) which contains only text.  My requirement is to prefix each row with an image followed by the text.  The image may or may not be indented a bit, like an expanded child node in a tree.

I know a gridview renders as a table and I know I could put an image at the beginning of each row in a table (using a repeater, for example).  But this is an existing app with a couple gridviews which need to be enhanced and I don't have the time to swap out the gridviews for repeaters.

I can't find any reference anywhere on the 'net which deals with this topic.  Anyone have any ideas?

Thanks in advance,


 - C# & .Net v4

How to write ListViewItem that contain image , text and button ?


I need to write some listViewItem  ( using WPF ) - that contain image, text and button.

I want to inherit from the simple listViewItem class and add to the listview item that contain the three items ( image, text, button ).

I don't understand how the listView control will arrange the 3 items ( image , text, button ) in the right order in the control - how to tell the listview control that the image is first, text is second and the button is the third ?  

setting the tooltip as image instead of Text


I'm a web dev newbie.I want to set tool tip as image(16X16).Is it possible to give a source as a image

Loading rtf with image gives "Unrecognized structure in data format 'Rich Text Format'.\r\nParamet


I'm trying to load this rtf into a RichTextBox:

{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch >> -----------------------------------------------------}{\ltrch \line }{\ltrch >> 19-10-2010 11:22}{\ltrch \line }{\ltrch >> -----------------------------------------------------}{\ltrch \line }\li0\ri0\sa0\sb0\fi0\ql\par}
{\f2 {\ltrch {\*\shppict{\pict\picwgoal1020\pichgoal1035\pngblip

How can I do this image and text split in html?


1) The image is from a asp:image tag
2) text is from asp:label

view here : http://screencast.com/t/fNL3SUzG

How can I get text to start after the image is set in the top left corner, and then have text wrap underneath the image, if the text is long enough.

I need to use asp:image and asp:labels as the inputs are populated from codebehind.

How can this text and image format be done ???

RSS feed text converting to Image in WPF


HI, I have created a WPF application where I could get RSS feeds of tweets from Twitter but my issue is, is that possible to convert that RSS feed into image and display as Image output containg text(tweet) in it. Hope I am clear enough. Right now i am displaying them as the Text Block. I want them to display as the image .  Any small hint would be appreciated.

Thanks in Advance,


Text Image Button


Hi All


I created a style for TextImageButton, you can see xaml below.

The button template has border in 45 degree transform and a content presenter.

Both in tsack panel with horizontal stack.

Sounds simple so far.


Everything works great so far. and I can use the same template for several buttons.


Now I want an image being set inside the rotated border, if set it statically it works great, but what I am trying to achieve is that each button will have his own image.


I do not want to create a different full style for each one, but I do not know if I can achieve that with basetype or not?







<Style x:Key="TextImageButtonControlTemplate" TargetType="{x:Type Button}">
   <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
   <Setter Property="Background" Value="{StaticResource ButtonNormalBackgroundFill}"/>
   <Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}"/>
   <Setter Property="Foreground" Value="{DynamicResource {xTongue Tiedtatic SystemColors.ControlTextBr

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend