Render A Scale (like A Ruler) Into A Picture?

Nov 8, 2010

Okay in my WebApplication i have a webform showing some pictures.The pictures - or better - the picturepath i get from a database.

With this paths i am loding the pictures into my webform.

Now i want to render a scale into these pictures. For example lets say 1px = 1cm.It should look something like in this sample picture:

Is it possible to realize somethin like that and how?!

I tryied to google something but i could not find anything!

View 6 Replies


Similar Messages:

Web Forms :: How To Allow User To Upload Picture And Then Save The Picture In Database

Feb 8, 2011

i'm new to c# and i wanted to know how can i allow user to upload a picture from a text box and a button??

after uploading the picture, how can i save the picture in the database??

**note**the picture i allow user to upload need to be in a fixed size.

View 4 Replies

Web Forms :: Get Full Picture When Try To Put Picture In Image Control?

Dec 23, 2010

I have this code to insert a picture from database into an ImageControl on my ASP.NET form:

strConnString = "server=" + Server + ";database=" + DataBase + ";UID=" + UID + ";password=" + PASS + ";";SqlConnection MyConnection = new SqlConnection(strConnString);SqlCommand MyCommand = new SqlCommand("SELECT Pic FROM MEN WHERE ID=5", MyConnection);MyConnection.Open();SqlDataReader MyReader = MyCommand.ExecuteReader();if (MyReader.Read()){ byte[] m_MyImage = (byte[])MyReader["Pic"]; Response.BinaryWrite(m_MyImage);}

And I have this ImageControl on the form:

<asp:Image Width="88" Height="100" Runat="server" ID="m_Image" NAME="m_Image" />

but when I run the code, I see the picture big on the screen and not in my ImageControl.

i also put this in the form_load:

m_Image.ImageUrl = "MyPhoneBook.aspx?m_Image";my control is: m_Imagemy control ID is: m_Imagemy namespace is MyPhoneBook

but still dont work

View 5 Replies

Can The Microsoft Stack Really Not Scale

Mar 28, 2011

based on a recent article on MySpace blaming the microsoft stack not being able to easily scale here.Is this true? Is scaling an app built on the microsoft stack (asp.net mvc here) nearly impossible? does php/LAMP really scale better than microsoft?

View 1 Replies

How To Scale Document Storage System

Feb 1, 2011

I maintain a web application (ASP.NET/IIS7/SQL2K8/Win2K8) that needs to access documents, actually hundreds of thousands of documents, and growing. Currently, they are all on a Windows 2K8 Server fileshare, being accessed by UNC path (SMB). The files are in a single flat directory and I'm trying to plan how to best improve this solution. I don't want to use the SQL Filestream attribute as it would be significant effort to migrate it all into that, and would really lock in to SQL Server. I also need to find a way to replicate the data for disaster recovery, so perhaps a solution can help with that too. Options could be: Segment files into multiple directories? application would add metadata for which directory it's on (or segment by other means) Segment files into separate servers? (virtualize)Backup becomes more complicated. Application would add metadata for which server it's on

NAS Storage
SAN Storage

Put a service (WCF) in front of the files and have the app talk to the service bonus of being reusable across many applications Assuming I'm going to store on filesystem and not in database (I've read those disccusions here), which would be a more scalable solution?

View 1 Replies

.NET+ MySQL On A Large Scale. Recommended?

Feb 7, 2010

I'm thinking of using ASP.NET and MySQL together on a large project. Does anyone have any experience in using these two on a large scale and are there any aspects I should be wary of? If there is a chance that there could be compatibility issues, then I may be prepared to purchase an MSSQL license, but I'd rather go the free route right now. In theory it's possible, but how easy is it to transfer a MySQL database to and MSSQL database in the future?(I'll make this a CW if requested).

View 2 Replies

Web Forms :: Uploading Picture - Error "picture Could Not Be Attached"

Mar 1, 2011

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.

protected void btnUpload_Click1(object sender, EventArgs e)
{
Boolean fileOK = false;
String fileExtension = string.Empty;
String path = Server.MapPath("~/Passport/");
if (fuPassport.HasFile)
{
fileExtension = System.IO.Path.GetExtension(fuPassport.FileName).ToLower();
String[] allowedExtensions = { ".gif", ".png", ".jpeg", ".jpg" };
if (allowedExtensions.Contains(fileExtension))
{
fileOK = true;
}
}
else
{
Utilities.PortalMessage = "Please attach an image file.";
return;
}
if (fileOK)
{
try
{..............................

View 3 Replies

AbcPdf To Scale The Html To Fit On A Single Pdf Page

Jan 25, 2010

I am using abcPdf to convert an HTML report into a pdf file. The pdf has to be a single landscape A4 page.Do you know if there is any way to tell abcPdf to scale the HTML page to fit on a single page in the pdf? I tried using the Magnify() method, and it scales the content but still breaks it into pages, even though it would fit on one page. I've been scratching my head on this for a while now

View 2 Replies

How To Upload Images On Server With Small Scale

Mar 4, 2010

i wants to upload images on server with small scale, large scale and medium scale on server hard disk when user uploads picture on server by upload image click..

View 1 Replies

Web Form Render Engine Outputs A Control Tree / Looking For Info On Render Logic.

Feb 12, 2011

I've been watching a video on Scott Hanselmnn teaching MVC 2 tricks/tips. He mentions how MVC 2 by default uses ASP.NET Web Forms view engine to render the output of the views; he mentions that the web forms view engine is a little slower than it could be for MVC 2 since it generates a control tree and then outputs the HTML to the page (I hope I said that right).

I was wondering what he meant by web forms generating a code tree before outputting the HTML to the page. Does anyone have insight on the view engine of Web forms and the steps of the rendering process works for ASP.NET and MVC2?

View 2 Replies

Plotting Locations From Database On Geographical Map (city Scale)?

Feb 21, 2011

I have to do the following.

There is a database (SQL Server) with locations (longitude and latitude values). I need to plot the route on the map (Google or otherwise) based on those locations extracted from database. Plotting lines and map are on ASP.NET webpage.

What would be the most and cost-effective way to accomplish the task above?

View 1 Replies

Practices For SQL Inserts On Large Scale In Reference To Ad Impressions?

Feb 20, 2010

I am working on a site where I will need to be able to track ad impressions. My environment is ASP.Net with IIS using a SQL Server DMBS and potentially Memcached so that there are not as many trips to the database. I must also think about scalability as I am hoping that this application becoming a global phenom (keeping my fingers crossed and working my ass off)! So here is the situation:

My Customers will pay X amount for Y Ad impressions These ad impressions (right now, only text ads) will then be shown on a specific page.The page is served from Memcached, lessening the trips to the DB When the ad is shown, there needs to be a "+1" tick added to the impression count for the database

So the dilemma is this: I need to be able to add that "+1" tick mark to each ad impression counter BUT I cannot run that SQL statement every time that ad is loaded. I need to somehow store that "+1" impression count in the session (or elsewhere) and then run a batch every X minutes, hours, or day.

Please keep in mind that scalability is a huge factor here.

View 2 Replies

C# - MS Chart Control Scale - Line Graph Show 12 Months?

Jun 7, 2010

On my X Axis, I have months. The chart shows up to 11 points, i.e. Jan - Nov of the same year, but when I add 12 points (Jan - Dec), it will do an auto label thing and change the interval for every 4 months.

How can I change the graph so that it shows 12 months before it does the auto labels?

Here is the server control code I am currently using.

[code]....

View 1 Replies

Unable To Get Picture Url

Aug 4, 2010

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.

View 2 Replies

C# - Can't See Picture On The Form?

Dec 4, 2010

i add Image control to my WebForm.i insert picture to App_Data.i connect the picture to my Image control in the ImageUrlit seen like this:

<asp:Image ID="Image1" runat="server" Height="94px"
ImageUrl="~/App_Data/Tulips.jpg" Width="209px" />

in the design i see this picture, but when i run the project i dont see the picture.

View 3 Replies

Build A Picture Of The Day In C#?

Apr 11, 2010

i'm trying to build a picture of the day in c#

string m1 ;
Image1.ImageUrl = "~/PictureOfTheWeekImages/+"m1"+.jpg";

and i want to insert the name of the file as a variable that changes with the date ...

my way not working .... i'm sure it somthing like this,

and i'm not sure how to write the url right ..

View 2 Replies

Set A Picture As The Background In .NET?

Jul 1, 2010

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

View 2 Replies

Asp:Image Not Showing Picture Sometimes?

Jul 17, 2010

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.

View 1 Replies

Inserting Picture Into Database

May 28, 2010

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?

View 1 Replies

StyleSheet.css Is Not Displaying The Picture

Feb 27, 2010

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

[code].....

View 8 Replies

How To Reduce The Quality Of The Picture So It Is Less Than 10 KB

Jan 15, 2011

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?

View 1 Replies

Use Of Picture Logo In Email|?

Sep 6, 2010

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

View 2 Replies

Determine Age Of A Picture File?

Nov 18, 2010

using vb.net 2005

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:

[Code]....

View 5 Replies

C# - Put Picture From Database To PictureBox?

Dec 21, 2010

i have sql-server-2008 database that contain image field that hold picture.

i have pictureBox control in my webform.

how to put picture from database to pictureBox control ?

(I work with C# asp.net FW3.5)

can i get any sample code or program ?

View 1 Replies

Find Imperfections In A Picture?

Jun 4, 2010

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?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved