|
Hi Friends,
I am succesfully putting image to datagrid column and its working fine.
Can any one tell me please how can I get image url back from gridview column to
store in a variable.
Any help will be appricieated.
tahnks
Naveed Kamboh
|
|
|
|
|
You simply get reference to the image control and get the image url.
|
|
|
|
|
Dear its a imagecolumn in gridview, Can you help me how to get reference of that column.
Naveed Kamboh
|
|
|
|
|
Hi there. The ImageField of the GridView contains an Image control internally, you can first get reference to the GridViewRow using the GridView.Rows, then you can look at the specific cell of the row where the imagefield is defined, and you can find it out from the Controls collection of the cell.
|
|
|
|
|
HI
can any one let me know that how to use Microsoft agent character in ASP.Net 2.0 , the character should be on the client side and the text which the character will speak will be dynamic(which will be get from the data base) and the gestures it will show will depend upon the values got from the data base.Please can any one let me know how to do it , if any one can provide the example , it would be great,
regards,
tippu
|
|
|
|
|
hi,
iam having ASP application With two input fields Username,Password and one button on click of button user information should store in xml.
I want to implement this with "Client Call Back"
Client Call Back.
is any one know it please help me.
kamalnath
|
|
|
|
|
|
I am developing an application in ASP.NET 1.1. on one page I allow the user to upload and delete the files to the server.
When I delete the file, I physically delete the file from the location. Then I again prompt the user to load a new file but I save the file with the same name the earlier image file had been saved. The problem is that when I again upload the page through Response.Redirect after uploading, it is showing the same image it was showing before deletion whereas in that location on server, there is another image. How my view of the image in the Image Control will change when a new picture has come.
Please give me any suggestion. All your suggestion are welcome.
Thanks in advance
Thanks,
Sandeep S. Sekhon
|
|
|
|
|
Looks like the image is cached. Can you see the new image if you refresh the web page? There are a couple of work-around options that you may try:
+ Use another name for the new image.
+ Use a seperate web page or custom http handler to read the image data and send it to the output stream.
|
|
|
|
|
Hi all,
I want to return a binary file from my webserver in .NET, so I've created an aspx file to do this, I then have something like this:
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "inline;filename=data.dat");
using (BinaryWriter writer = new BinaryWriter(Response.OutputStream))
{
for (int x = 0; x < 100; x++)
{
writer.Write(x);
}
}
}
This works well in that I get my binary data and IE pops up a save file dialog, but the problem I have is that ASP.NET adds on a load HTML stuff to the end - the default output from an aspx page.
Does anyone know how I can prevent ASP.NET from adding this stuff to the end and corrupting my file?
Thanks for the help!
Regards,
Rob Philpott.
|
|
|
|
|
Remove the content of the page, so that it only contains the @Page directive.
---
b { font-weight: normal; }
|
|
|
|
|
Tried that - complains that there was no <HTML> tag.. ?
Regards,
Rob Philpott.
|
|
|
|
|
Who complains?
---
b { font-weight: normal; }
|
|
|
|
|
I have this code to get an image from a database and just shoot out the binary so I can use images from a database in a datagrid with template column and asp:images. So I can put "~/GetPic.aspx?id=X" in the ImageURL attribute of the asp image. Hope it helps.
<br />
int id = Convert.ToInt32(Request.QueryString["id"]);<br />
<br />
Advertisement ad = new Advertisement(id);<br />
<br />
Response.ClearContent();<br />
Response.ContentType = "image/jpeg";<br />
Response.OutputStream.Write(ad.Image, 0, ad.Image.Length);<br />
Response.End();<br />
<br />
|
|
|
|
|
Perfect! Thank you. It's ages since I've done any ASP.NET stuff, and the line I was looking for was simply:
Response.End();
Regards,
Rob Philpott.
|
|
|
|
|
Hi,
I am doing a project in ASP.NET. I need to give the user to upload the documents through the website. While uploading the document, I would like to show the progress bar to show the status of the upload process. How can I do this?
With Regards,
Sheshadrinath.R
|
|
|
|
|
|
Hi there.
I have a GridView and a FormView. The FormView ObjectDataSource is listening to the Grid´s selected ID to display the detailed Data.
It is not visible before I select anything from die Grid.
What I would like to do is to show the FormView in Insert Mode, if there is no data in the Grid or no data has been selected yet. At the same time I´d like to display a message in the Grid if there is no data to display.
It would be nice, if someone could point me in the right direction
Thanks in advance,
Brokit
|
|
|
|
|
+ To display something when the datasource of the GridView control is empty you can use the EmptyDataText/EmptyDataTemplate properties of the control, you can read more about these in MSDN.
+ Also to change the default mode of the FormView to Insert, you simply check the datasource length, if you use the DataSource control with the GridView control you can do a checking on the select result in the Selected event, then change the mode of the FormView with the DefaultMode property or the ChangeMode method.
|
|
|
|
|
Hi
Urgent...How to place images on runtime? i do not know the number of images that will be placed on the page?
|
|
|
|
|
Create <asp:Placeholder id="myPlaceHolder" runat=server">
and then in code you can do following
using Image = System.Web.UI.WebControls.Image;
for(int i=0; i < imageUrls.Count; i++)
{
Image myImage = new Image();
myImage.ImageUrl = imageUrls[i];
myPlaceholder.Controls.Add(myImage);
}
I didn't try it, but it should works
Pilo
|
|
|
|
|
Thanx Pilo!!
It works..
Now if u could help me with the placement of the PlaceHolder?
Thanx again. :>
Fahad
-- modified at 3:01 Thursday 3rd August, 2006
|
|
|
|
|
Lol, how is it possible that it works, if you dont have a placeholder
just place it in your .aspx file, on place where you want to have images:
<body>
<form id="form1" runat="server">
<div>
<asp:Label runat="server" id="label1" Text="Here are my personal nude pics:"/>
<asp:Placeholder runat="server" id="myPlaceholder">
</asp:Placeholder>
</div>
</form>
</body>
Placeholder is not rendered on a page, it is just what its name says: placeholder. you can use it to reference a place in your page to work with it in your code. So when you put image controls into it, it will be rendered just as a collection of images.
Pilo
|
|
|
|
|
Hi,
I placed the placeholder but i cannot drag the placeholder to the location where i require it to be. when i drag n drop the placeholder from the toolbox panel it always places itself on the left top of the screen.
How did u think that i hadnt placed a plceholder??? You thought i was being dishonest and saying that it worked. ;(
Thanx anyway again..
Fahad
|
|
|
|
|
Heh, don't take it personaly, I was joking, because in your post you wrote, that it is working, but you didn't place placeholder
You can move your placeholder using html tags, this is default behaviour in aspx designer, that you don't have a grid. Probably you can turn the grid on, but I'm not in office and I don't have VS on my laptop, so I can not tell you how. But I never use grid, it does not seem to be right way how to position placeholder.
just wrap it into <div> tag and align this div to center. if you want to move it down, use <br/>
Pilo
|
|
|
|