I have an .aspx page with a gridview and a details view for looking up products. It is working perfectly. When I select "Details" on the gridview the details view accurately populates.I added an image named TagImageand need that image to display the correct one based upon the product changed when "Details" is hit. I'm using code behind and have checked my image directory string to make sure it is OK but the images do not display. Here is the vb.net code hehind I am using that successfully populates the details and was hoing it to display the picture:
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) AccessDataSource2.SelectParameters("ProdID").DefaultValue = _ GridView1.SelectedDataKey.Value.ToString()
Currently i'm saving pictures to our sql server db. A user can go to a clients info page and click an id card image to open a new tab or window and see the picture saved for that client.
What I would like to do is when a client info page opens a small version (thumnail) of the picture to display and let the user click the thumbnail to open a bigger icture in a popup window.
I ve an application dat am working on. The section of the upload picture works perfectly on the development environment and also on a test server but the issue comes up when it was hosted life. I started geting an error dat says picture could not be attached. I ve a folder cald Passport and dis ve been working for me on befor now but i dont now the reason y its not working now.
In order to avoid having to pass Data that goes in the master page of my site before every view in every controller I have created an ApplicationController that sets the data on its constructor... the problem with this approach is that one of the viewdatas I must pass is the url of the profile Image of the current logged in user.
[Authorize(Roles = "Administrator")] public abstract class AdministratorController : Controller { private IPortalAdministratorServices _servicioPortalAdministrator; public AdministratorController() { _servicioPortalAdministrator = new PortalAdministratorServices(); ViewData["associates"] = _servicioPortalAdministrator.getAssociates(); ViewData["picture"] = _servicioPortalAdministrator.GetPic(); public AdministratorController(IPortalAdministratorServices service) { _servicioPortalAdministrator = service; } }
and so my companies Controllers wich inherits from AdministratorController now doesnt have to set all that Data upon every View Call.
[Authorize(Roles = "Administrator")] public class CompaniesController : AdministratorController { private ICompaniasServices _service; public CompaniesController() { _service = new CompaniasServices(new ModelStateWrapper(this.ModelState)); } public CompaniesController(ICompaniasServices service) { _service = service; }
The problem is this: When I try to manually access the Companies Controller without actually being logged in the method GetPic() wont actually be able to get the picture url cause no one is logged in.. and these method is getting called in spite of the Authorize attribute....so now, even after being logged in the ViewData for the picture url has been permanently set to "unknown.png" Some of this code isnt mine.. I just discovered the bug but cant figure out how to fix it.
I am unable to get the background picture to show in my pages. I am trying to do this in the master page using CSS.I have a CSS which contains the following:
body { background-image: url(../images/background.jpg) no-repeat; background-attachment: fixed; margin-top: 0px; }
I know the CSS is being read because all other styles defined in it are working on the .aspx pages... except of course the background image, the background remains white. (This works perfectly fine in .php pages by the way.)I have been searching online like crazy and all the answers I find, say the above CSS code is the answer... but it is not working!I am using the following:
Microsoft Visual Studio 2008 Version 9.0.30729.1 SP Microsoft .NET Framework Version 3.5 SP 1 Firefox Version 3.6.6
In one page I have image controls that are showing pics from the web site. This works fine but sometimes, and randomly some pics are not shown. I guess this issue could happen because Im using the IIS 5.1 in my development enviroment and it could be denying some requests. Anyway, I dont know exactly what is happening, so i request help of those who have workaround this fixture.
I am inserting a picture into a database, using the following code.
strFileType = Path.GetExtension(filImage.PostedFile.FileName).ToLower(); switch (strFileType) { case ".gif": strMimeType = "image/gif"; break; case ".jpg": case ".jpeg": case ".jpe": strMimeType = "image/jpeg"; break; case ".png": strMimeType = "image/png"; break; } //Store the content length int iDocLength = filImage.PostedFile.ContentLength; byte[] bDocBuffer = new byte[iDocLength]; //Get stream object Stream streamImage; streamImage = filImage.PostedFile.InputStream; streamImage.Read(bDocBuffer, 0, iDocLength); cmPerson.CommandText = "INSERT INTO photos VALUES(@referenceid, @image, @imgtype)"; cmPatient.Parameters.AddWithValue("@referenceid", iPersonID.ToString("000000")); cmPerson.Parameters.AddWithValue("@image", bDocBuffer); cmPerson.Parameters.AddWithValue("@imgtype", strMimeType); cmPerson.ExecuteNonQuery();
If in case that the user, did not browser for a picture, then, I have to use the nopho.jpg that is stored in the images/folder of my web app. How am I be able to do this?
Why StyleSheet.css is not displaying the picture depends on the situation. It displays “Taken!“ or "Available!" but no picture. I am using Ajax with asp.net
I am using asyncfileupload ajax control and can successfully upload and save picture on server.I need to do the following and not sure how:When user is in process of uploading, I only want them to see *.jpg *.gif and *.bmp files Once the user uploads their picture, how do I reduce the quality of the picture so it is less than 10 KB?
i hope u will be fine and best. plz tell me how can i set the image in my generated email ? i want to set the logo of my company in the right corner of my email
I am looping through a directory and grabbing a jpg filename if it matches certain conditions (shown in my code snippet below).
However there might be more than one jpg in the file with the same name string "BarneyIsCool" and in this case I need to get the newest file that contains "BarneyIsCool" .
my question: How do i determine which file is the newest (last one added to the folder) using my vb.net code? the relevant code snippet follows:
I have no clue if it is possiable but lets see. is there a way for a .NET app (windows app) to look at a picture for imperfections (for example a watermark or a set object or shape i can tell it) and if it finds it thorw a error?
I want to know, how can i open a picture from a web page to picture viewer like microsoft picture manager, when i click a button it should open a image in picture manager, picture is in one of my folders.
I am developing project using asp.net 2.0 and C#.net.I want to capture users picture or video from webcam and save it in a folder in Harddisk. how to develop this feature and if possible provide me reference links.
using asp.net/vb.net 2005. when I am in VS and I run the application I have a .net Image control where I am displaying an image programmatically and when I run this in VS all works well, the image displays.
I have the site setup in IIS now on the dev server however the problem is when I run this program from there, just navigating to the [URL] then I can run the program and not getting any exception, however I am not seeing the image when I click the button to view the image. The code is something like this: [Code]....
again this shows ok when I am in the application in vs.net in debug mode but not showing at all when I just open a broswer window and view it as a user would, has anyone seen this before?
I build a website with management system. In the management pages, I can upload pictures to a specific folder in my website. While doing it in my localhost in works perfect. While doing it on the hosted site, I get: A generic error occurred in GDI+. I read a little bit about it, and relized that it is probably an authorization problem. I asked the hosting to let a iusr_xxx permition to that folder. I've just informed now that it was done. The problem still occures. Here is the problematic code. It falls on the save command:
using { bitmap.Save(MapPath("../images/lawyers/" + fileName), image.RawFormat); }
I tried already to put GC.collect(); after this line and alse I tries bitmap.Disppose() after this line.