Click here to Skip to main content
15,888,303 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: server side editor Pin
dcof26-Jul-12 6:07
dcof26-Jul-12 6:07 
GeneralRe: server side editor Pin
Richard MacCutchan26-Jul-12 6:23
mveRichard MacCutchan26-Jul-12 6:23 
Questionprevent to copy my web pge Pin
Elham M24-Jul-12 21:28
Elham M24-Jul-12 21:28 
AnswerRe: prevent to copy my web pge Pin
Bernhard Hiller24-Jul-12 21:36
Bernhard Hiller24-Jul-12 21:36 
GeneralRe: prevent to copy my web pge Pin
Elham M24-Jul-12 21:51
Elham M24-Jul-12 21:51 
AnswerRe: prevent to copy my web pge Pin
StianSandberg24-Jul-12 23:36
StianSandberg24-Jul-12 23:36 
GeneralRe: prevent to copy my web pge Pin
Elham M25-Jul-12 22:21
Elham M25-Jul-12 22:21 
GeneralRe: prevent to copy my web pge Pin
StianSandberg25-Jul-12 22:31
StianSandberg25-Jul-12 22:31 
code to base64 encode and split it?
You can do it. I'll give you a few tips:

Online tool for converting images to base64 embedded image: http://webcodertools.com/imagetobase64converter/[^]
This will give you an img-tag ready to use.

Example (using jQuery):
HTML
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf89hAAAAB3RJTUUH2AQPB0tAAAAARnQU1" />

I removed most of the string for it to be easier to read. They are usually very long

Then you take the base64 value "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf89hAAAAB3RJTUUH2AQPB0tAAAAARnQU1", put it in a javascript variable (or multiple) like this:

JavaScript
var part1 = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAA';
var part2 = 'QCAYAAAAf89hAAAA';
var part3 = 'B3RJTUUH2AQPB0';
var part4 = 'tAAAAARnQU1';
// you can name these variables something different 
// and put them in different js-files making them more difficult to find.

Remove the src-attribute value from your img-tag and give it an id-attribute
HTML
<img src="" id="myImg"/>


JavaScript
// load the image like this
$(document).ready(function(){
  var base64src = 'data:image/png;base64,' + part1 + part2 + part3 +part4;
  $('#myImg').attr('src', base64src);
});



This will NOT prevent a user from copying your image! It's (as I said) easy to do a screenshot...
--------------------
When Chuck Norris' dreams come true, your worst nightmares begin.

GeneralRe: prevent to copy my web pge Pin
Elham M26-Jul-12 1:18
Elham M26-Jul-12 1:18 
AnswerRe: prevent to copy my web pge Pin
StianSandberg26-Jul-12 1:52
StianSandberg26-Jul-12 1:52 
GeneralRe: prevent to copy my web pge Pin
RamShankarMCA26-Jul-12 2:12
RamShankarMCA26-Jul-12 2:12 
GeneralRe: prevent to copy my web pge Pin
Elham M26-Jul-12 2:55
Elham M26-Jul-12 2:55 
GeneralRe: prevent to copy my web pge Pin
Pete O'Hanlon26-Jul-12 3:00
mvePete O'Hanlon26-Jul-12 3:00 
QuestionGetting "Index was out of range" error.. Pin
Diana Tsilidi24-Jul-12 9:06
Diana Tsilidi24-Jul-12 9:06 
AnswerRe: Getting "Index was out of range" error.. Pin
jkirkerx24-Jul-12 10:20
professionaljkirkerx24-Jul-12 10:20 
AnswerRe: Getting "Index was out of range" error.. Pin
Bernhard Hiller24-Jul-12 21:51
Bernhard Hiller24-Jul-12 21:51 
GeneralRe: Getting "Index was out of range" error.. Pin
jkirkerx25-Jul-12 8:45
professionaljkirkerx25-Jul-12 8:45 
GeneralRe: Getting "Index was out of range" error.. Pin
Diana Tsilidi25-Jul-12 9:09
Diana Tsilidi25-Jul-12 9:09 
GeneralRe: Getting "Index was out of range" error.. Pin
jkirkerx26-Jul-12 9:15
professionaljkirkerx26-Jul-12 9:15 
GeneralRe: Getting "Index was out of range" error.. Pin
Diana Tsilidi26-Jul-12 19:32
Diana Tsilidi26-Jul-12 19:32 
QuestionSystem.Byte[] error Pin
Jassim Rahma23-Jul-12 21:41
Jassim Rahma23-Jul-12 21:41 
GeneralRe: System.Byte[] error Pin
Bernhard Hiller24-Jul-12 0:25
Bernhard Hiller24-Jul-12 0:25 
GeneralRe: System.Byte[] error Pin
Jassim Rahma24-Jul-12 3:22
Jassim Rahma24-Jul-12 3:22 
Questionhow to select and read data in dropdownlist? Pin
mohammad ehsan23-Jul-12 19:45
mohammad ehsan23-Jul-12 19:45 
AnswerRe: how to select and read data in dropdownlist? Pin
_Amy24-Jul-12 1:52
professional_Amy24-Jul-12 1:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.