Posts

Protect image from being copied

Image
Hello Friends, Many times I am asked to protect some copyrighted images over web, so finally I have found a better way to protect from being copied. There are some cases by which we can copy the image Here I have taken care of following cases Right click on image and Save the Image Save the Entire page and all images displayed on page will be downloaded to its Data Folder in mozila Firefox, We can save the media files by following steps Right click on Page, select “View Page Info” It will open a window, Select “Media” tab, here a list of all files will be available select particular file and click on “Save As” button to save the media Now Let’s Start our main topic,that is protect image from being copied There is a concept called Data URI scheme . Generally to display any image on page, we use Relative_URL and if we display image using this, the images can be easily copied. Here we will save image in database and retrieve the same To Create table CR...

Fetch Data from Control Without Loop- Best Use of LINQ

Hi friends…. Many times I need to generate collection type Data from GridView or Repeater or any other control.. and in that case I used to loop through each rowitem of particular control.. here each row of repeater is listitem of LINQ query. same way you can perform for all DataBound Controls like GridView, Repeater, DataList, DropDownlist, CheckboxList, Radiobuttonlist etc… but after using LINQ , I am able to do that very easily here is sample of Repeater control to Get List of data List ctrls = (from item in rptctrlList.Items.Cast () where ((CheckBox)item.FindControl("chkctrl")).Checked select new ctrlInfo() { ctrlId = Convert.ToInt32(((HiddenField)item.FindControl("hdnctrlId")).Value), UserctrlId = Convert.ToInt64(((HiddenField)item.FindControl("hdnUserctrlId")).Valu...

Apply Frame to Image with CSS

Image
Hello Many times we need to display image like profile image or advertisements and at that time we need to decorate it within frame…   Here we have a simplest way to apply frame which will help to set frame to any size image and unique for all.. here I have a sample code for it <html> <head> <style> img { background: url("shadow.gif") no-repeat scroll right bottom transparent; border-color: #EEEEEE -moz-use-text-color -moz-use-text-color #EEEEEE; border-right: medium none; border-style: solid none none solid; border-width: 1px medium medium 1px; padding: 4px 10px 10px 4px;} </style> </head> <body> <img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxKSyD46sNlLs8yYLBFMz_YGOiYANzbKSUPo5YT5f2K34QvZgGOWTWF_s_aWPoe4zuVafRytM6346dkW7bkjptRImMMCLWyaCxtGgAjPD97wa7HWZ_l94H2uWxlU8V2UKIJPgvyj7sTO5x/s220/Sandeep.JPG'> </body> </html> and the you can have any kind of frame imag...

Publish webservice locally without separate hosting

Image
Hi.. here is a way to deploy web service withing project... Here are the steps for it in your Project... right click on Project in Solution Explorer. Click on Add new Item and Select "Web Service" Name it as per required... and Click on "Add" Button... now you have your web service ready in local environment... put you code in Web Service .Cs file Build the Source and make sure its error free... now Deployment Part Right click on "References" in Solution Exporer, You will find.. three Options like     Add Reference     Add Web Reference     Add Service Reference Select "Add Web Reference", you will get a Pop up, in Below there are three links Browse to:     * Web services in this solution     * Web services on the local machine     * Browse UDDI Servers on the local network select "Web services on the local machine " You will get a list ...

Select Multiple Checkbox with Shift key in Gridview by javascript

Image
Hello Friends, Recently i was just looking at my Gridview where i have a checkbox in each row.. now i need to select all Check box.. for that lots of material is available on net.. and all are enough so i am not going to deep in it check out this… http://www.codeproject.com/KB/grid/GridCheckBox.aspx but now my problem was that i wanted to select few rows but not all let’s say in my gridview the number of records are around 100.. and i want to check the checkbox of first 35 records in that case i had to click on checkbox of all 35 rows. i thought, like all mail accounts like gmail, yahoo, live and in may more… i should be able to select multiple records by shift key. means select the first record and pressing shift key select the 35st record so all the records in between will be selected.. and for that i found lots of jquery or any other javascripts. but here i have tried to make something my own and i am happy to make it.. here is code on Page <asp:GridView ID=...

Epic Browser

Background of Epic The Epic Browser is the first-ever web browser for India and the first product from the software company Hidden Reflex. Hidden Reflex is a software product startup founded by Alok Bhardwaj in 2007 and based in Bangalore. Alok, who was raised in the U.S., was inspired by the success of open source software and web 2.0 innovations. Hidden Reflex began as a team of three but soon progressed and now has dedicated teams working on two products simultaneously – the Epic Browser and NewsDrink. The company also has three patents pending related to its product innovations. The company’s vision is to become the first globally recognized, consumer-oriented software product company in India. According to Alok Bhardwaj, CEO and Founder of Hidden Reflex, “We want to prove that India can be a hub for innovation in software and technology." Our mission with the Epic browser is to create the most secure, most productive and most “Indian” browsing experien...

Access ViewState From ClassFile

teHello Friends Manytime we need to use ViewState while working 3-tier Architecture but its difficult to use it. here i have made a sample to use Viewstate from Classfile ViewState: Viewstate is an object of Class StateBag  Here is sample of Viewstate in Class file in this example we will add names from Textbox to gridview using Viewstate. so in code behind <div> Name : <asp:TextBox ID="txtName" runat="server"></asp:TextBox><asp:Button ID="btnAdd" runat="server" Text="Add" /> </div> <div> <asp:GridView ID="grvNames" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None"> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <Columns> ...