|
<asp:templatefield headertext="Checkbox">
<itemtemplate>
<asp:checkbox id="something" runat="server">
<asp:templatefield headertext="Checkbox">
<itemtemplate>
<asp:linkbutton id="something" runat="server">
|
|
|
|
|
http://www.codeproject.com/useritems/DynamicTemplateColumn.asp
sorry!I have added some code in the beginning.
but it is not displayed.
u see above link.
|
|
|
|
|
Thanks for the reply. I finish with that. Thanks again...
|
|
|
|
|
hi,
I have a table in my page which is created at run time(data are getting added to row dynamically from database).
Since sone text are long i am trimming the length to 17. But on mouse over of the text in each cell of table the text should be expandedto full length.
How can i do it??
Please help me out.
Thanks,
Srikanth
|
|
|
|
|
why don't u show the full text in a tool tip ..?
Koushik
|
|
|
|
|
Already i am showing a text in tooltip. Tooltip aleady holds a value. I cannot use tooltip
Thanks,
Srikanth
|
|
|
|
|
dude! i think u have to do this using javascript...identify the id of the and then increase the width of the cell on mouseover ...again restore the width to normal on mouseout...
Koushik
|
|
|
|
|
I don't know is it possible or not but increasing the width of table cell not only affect that cell but whole table. As Kaushik said its better to show it in tooltip.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Tooltip is an option which i can go for. But tool tip aleady holds a value. I thought of showing the full text with a appearance like the cell getting a zoom like thing.
Did you get me. In some pages i hope you would have seen on mouse over the control gets zoomed a bit. Thought of trying that.
Thanks,
Srikanth
|
|
|
|
|
i understood what you want to implement could you give me the link or url where you saw this ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Any one u Guys can tell
How to Use Edit/Delete Items In Repeater Control
prabumj@gmail.com
|
|
|
|
|
The repeater doesn't support anything like that, you'd be writing it entirly from scratch yourself. The strength of the repeater is it is simple, and therefore easy to modify
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
If you want to Edit/Delete the Items in a DataControl Use DataList. Because Repeater Control doesn't comes with the provision of EditItem Template.
Regards - J O N -
|
|
|
|
|
how to retrive images from sql database which is already strored, and show in image componet, using asp.net with c#.
i have used this code for storing image to database. this code store images in database, but i dont know that how to retrive it and show in an image component
protected void Button1_Click(object sender, EventArgs e)
{
int ImgLen = FileUpload1.PostedFile.ContentLength;
string strSQL = "";
byte[] FileImg = new byte[ImgLen];
FileUpload1.PostedFile.InputStream.Read(FileImg, 0, ImgLen);
// Inserting the image to DB
try
{
con.Open();
strSQL = "INSERT INTO Table1 (image) VALUES (@pic)";
SqlCommand cmd = new SqlCommand(strSQL, con);
cmd.Parameters.AddWithValue("@pic", FileImg);
cmd.ExecuteNonQuery();
}
finally
{
con.Close();
}
}
yogesh
|
|
|
|
|
yogesh_softworld123 wrote: how to retrive images from sql database which is already strored, and show in image componet, using asp.net with c#.
How to google[^] for retrive images from sql database which is already strored, and show in image componet, using asp.net with c# ?
|
|
|
|
|
You might have saved those images in a table.If it is so, u can just retrieve them by using datareader . It is similar to how u retrieve data from the table using datareader. You just mention the column name.
Thank u
|
|
|
|
|
Re: how to retrive images from sql database which is already strored, and show in image componet, using asp.net with c#
yogesh
|
|
|
|
|
I seem to tell people this daily. To pass an image into a webpage, it needs to exist on the file systme, so you should store paths in your DB.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
Christian Graus wrote: it needs to exist on the file systme
It doesn't (disagreeing with CG?? - Any credibility I had may now hit the deck.....).
I store images of all our staff in SQL database, and generate an ImageURL on the fly.
<br />
Image img = new Image();<br />
img.ImageURL = "~\ImageBuilder.Aspx?staffID=1234";<br />
The ImageBuilder page retrieves teh binary data from the SQL, and writes it out in the Response . No files are saved anywhere. I don't have the code to hand else I would post it.
-- modified at 3:41 Wednesday 24th October, 2007
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
write the code to retrieve the image from the Database and store it in Byte[] array. Set the Content Type of the Reponse Object - Response.ContentType = "image/gif" and then write out the Binary Data using the Response.Binary()
Regards - J O N -
|
|
|
|
|
Hi JON Prabhu
I am using ASP.NEt,VB.NET to save and reteive the images from DB, i recently posted in Vb.NEt forum the Same and as Christian suggested i used file system to retrive image using file system and only storing path in DB. it getting saved and retrive.
But still i am trying to know how to retrieve the image from DB here is the sample code i have used to retrive image form DB but i am only getting the imagebox with crossed but not image is getting showed.
<br />
<br />
Private Sub btnRetrive_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRetrive.Click<br />
Dim sqlconn As New SqlConnection(ConfigurationSettings.AppSettings("BILL_CONSTR"))<br />
Dim sqlcommand As New SqlCommand("select PersonImage from dbo.Person where PersonID=3", sqlconn)<br />
Try<br />
sqlconn.Open()<br />
Dim SqlData As SqlDataReader<br />
SqlData = sqlcommand.ExecuteReader(CommandBehavior.CloseConnection)<br />
Do While (SqlData.Read())<br />
Response.ContentType = "image/gif"<br />
Response.BinaryWrite(SqlData.Item("PersonImage"))<br />
Loop<br />
sqlconn.Close()<br />
Catch SQLex As SqlException<br />
Response.Write("Insert Failed. Error Details are: " & SQLex.ToString())<br />
<br />
End Try<br />
End Sub<br />
<br />
<br />
<br />
<br />
sathimailin
|
|
|
|
|
The code which you have written seems correct. It should probably work. Just put a break point and do a step-wise execution and check whether the execution reaches the code Response.Binarywrite() .
Regards - J O H N -
|
|
|
|
|
hi Prabhu,
Its getting executed and i am getting a page with only image box not an image shown but passes all the code lines and when i right click and see the properties
it shows not avalable.
sathimailin
|
|
|
|
|
I suppose the Image is not Uploaded properly. Just Try uploading a new Image file and check with it. below is a sample code which works well in one of my project.
Response.ClearHeaders()<br />
Response.Cache.SetNoStore()<br />
Response.ContentType = "image/gif"<br />
Response.BinaryWrite(lImageDataset.Tables(0).Rows(0)(0))
Regards - J O H N -
|
|
|
|
|
THanks Jon
i will try with new one
|
|
|
|