18 Aug 2017

How to Disable Copy and Paste on Blogger Posts

Rock programmer provide to in this Tutorial share a Letest Tip regarding to Blogger, How to Disable or Banned the Copy Paste Option in your Site, And disable the Ctrl+A option in blogger , because this Concept provide means your website content is secure

The following the code is blow-

Step1. Go to the Dashboard ==>Layout.

Step2. Go to the  Add a Gadget.

Step3. Go to the select Gadget Html/JavaScript.
Step4. Go to the Gadget.
Step5.  past the java script.

 Copy and Paste Disable code is blow -

<!- start disable the copy paste code --><script src='demo-to-prevent-copy-paste-on-blogger_files/googleapis.js'></script><script type='text/javascript'> if(typeof document.onselectstart!="undefined" ) {document.onselectstart=new Function ("return false" ); } else{document.onmousedown=new Function ("return false" );document.onmouseup=new Function ("return false"); } </script><!-- End disable the copy paste code --></!->

Read Complete

How to create privacy policy page in blogger

How to create privacy policy page in blogger

You can create a privacy policy itself, But you need knowledge. mostelly the bloggers don't have a knowledge regarding to privacy policy . How to create a good privacy policy . In that case, I am provide to knowledge for bloggers, How to generate privacy policy in a blogger, basically i am using one such service provided by 

SerpRank.com


How to Generate Privacy Policy-

Open the site SerpRank privacy policy generator page.

The Serp Rank privacy policy page submit the Own blogger Site URL and Email Id.

If your blog use cookies then select Yes button then we use cookies option. [if you are serving advertising]

If you want to put google Adsense on blogger then select the  google Adsense options.

Click the create my privacy policy button.


How to add privacy Policy page on own blogger.

1.Go to the blogger dashboard.

2.Create new page in a blogger.

3.Copy the code privacy policy past in blogger page.

4.Add page title is "Title of Privacy policy ".

5.Public your Page.

Read Complete

17 Aug 2017

What is operator in c sharp

What is operator in c#

Operator is like +(Addition) and Substractional and multiplications are used to process variable & return a value


consider the foloowing expression-

X+Y
The additional operato add the value X and Y Operands

Types of following c#

1. Arithmetic operators

2.Arithmetic Assignment Operator.

3. Unary Operator.

4.Compression Operators.

5.Logical Operators

Read Complete

what is variable in c# with example

What is variable .

A variable is a location in the memory.


Example 
                        user (10,15) 




Syntex- <Data type><variable_name> = <Value>;

int num = 2;

Int = int data type

Num = variable name

2 variable initialization

Data type in c#

Char
Int
Float
Double
Bool
String

Ex- String Name = "Devesh";
Float Marks = 83.56;
Int Age = 14;
Char Vowel = 'M';

Data type support by c#.

Write a program num and msg print.

Class ABC
{
static void main(string[]args)
{
int a,b,c;
a=10;
b=15;
c=a+b;
console.wirite("Sum is :" +c);
console.readline();
}
}
}

Read Complete

what is c# programming language

what is C# programming language.


C# is an Object oriented programming language it is developed by Microsoft. It can be simple and modern and general purpose programming language. It is used Application Development,


Syntex- 
Class Class_name 
{
Public static void main(string[]args)
{
system.console.WriteLine("Class_name,word!\n");
}
}

What is the main() function

The main() function is entry point of application

What is system.console.WriteLine().

It is display the enclosed text on the user's screen

what is the Escape charator.

Escape charator is display new line charactor and othe special char be display such as- /n /t /b

Read Complete

16 Aug 2017

how to install json.net in visual studio 2015

what is Json-

Json is just like dataformate.it is not language. jquary use in json. jqury do not use dataset and data table.

how to install json

Step1. json install.

Step2. Tools ==> Library Package manager ==>package manager console.



Step4.   Install-Package Newtonsoft.Json -Version 6.0.1 (run this command)


Step5. Complete Download Process the Json
step5. goto the project name then click the right click build the project.

Read Complete

How to insert data in sql database Using jQuery Ajax and Json

What is jQuery-  jquery is just like library. it is not any language. we can insert update delete etc in ajax method  in jquery library.

Step1.  Download jquery file.

Step2. Copy jquery file past in project.


step3. Drop the jquery file in Header section.


Note- we need to json in ajax and jquery file.

what is Json-

Json is just like dataformate.it is not language. jquary use in json. jqury do not use dataset and data table.

how to install json

Step1. json install.

Step2. Tools ==> Library Package manager ==>package manager console.



Step3. 



Step4.   Install-Package Newtonsoft.Json -Version 6.0.1 (run this command)

Step5. Complete Download Process the Json



step5. goto the project name then click the right click build the project.




Types of Jquary property.-

jquary are seven type of property.

1. url:' ',

2.type:' ',

3.datatype:' ',

4.contentType: ' ',

5.data: " ",

6.success:


7.error:

Note.Ajax method in data property in value pass by default will be reached ajax method in url property define by function.

Step1. url:'  ',

syntax-   url: 'employee.aspx/Devesh',

Step2. datatype: '  ', - json type.

Step3. type: '  ', - Post.

Step4. contentType: '  ', - syntax-'application/json;charset=utf-8',

Step5. data:'  ',  (ajax method data property )

code syntax- "{A :'"+ $("#TextName").val() +"',B :'"+ $("#TextAge").val() +"',C: '"+ $("#TextAddress").val() +"'}",

Step6. success - This property can be use to your program is not missing code the success mgs pass,

Step7. error. This property can be used to your record insert time any missing then msg pass is error ,

How to insert record in database jquery.

Database code-

create database selfjquary15_8_17

use selfjquary15_8_17

create table-
create table Employee
(
Empid int primary key identity(1,1),
Name varchar(50),
Age int,
Address varchar(50)
)

select stetment-

select * from Employee

Insert procedure-

create proc usp_employee_insert
@Name varchar(50),
@Age int,
@Address varchar(50)
as
begin
insert into Employee(Name,Age,Address) values(@Name,@Age,@Address)
end

Aspx page coding.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="employee.aspx.cs" Inherits="selfjquary15_8_17.employee" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="jquery-3.2.1.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            GetData();
        });

        function Savedata()
        {
            $.ajax({
                url: 'employee.aspx/Devesh',
                type: 'post',
                contentType: 'application/json;charset=utf-8',
                datatype: 'json',
                data: "{A :'"+ $("#TextName").val() +"',B :'"+ $("#TextAge").val() +"',C: '"+ $("#TextAddress").val() +"'}",
                success: function () {
                    alert('data inserted !!');
                    GetData();
                },

                error: function ()
                {
                    alert('data error !!');
                }
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table>
                <tr>
                    <td>Name:</td>
                    <td><input type="text" id="TextName" /></td>
                </tr>

                <tr>
                    <td>Age:</td>
                    <td><input type="text" id="TextAge" /></td>
                </tr>

                <tr>
                    <td>Address:</td>
                    <td><input type="text" id="TextAddress" /></td>
                </tr>

                <tr>
                    <td></td>
                    <td><input type="button" id="btnsave" value="Save" onclick="Savedata()" /></td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>

CS page coding.

Three namespace add on cs page.
using System.Web.Services;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web.Services;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;


namespace selfjquary15_8_17
{
    public partial class employee : System.Web.UI.Page
    {
       static SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString);
        protected void Page_Load(object sender, EventArgs e)
        {
        
        }
        [WebMethod]
        public static void Devesh(string A, int B, string C)
        {
           con.Open();
           SqlCommand cmd = new SqlCommand("usp_employee_insert", con);
            cmd.CommandType= CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Name",A);
            cmd.Parameters.AddWithValue("@Age",B);
            cmd.Parameters.AddWithValue("@Address",C);
            cmd.ExecuteNonQuery();
            con.Close();
        }
    }

}

Web.config page code-

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
    <system.web>
      <compilation debug="true" targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
    </system.web>
<connectionStrings>
  <add name="DBCS" connectionString="data source=Shiva;integrated security=true;initial catalog=selfjquary15_8_17 "/>
</connectionStrings>

</configuration>

why make the static sqlconnection.

Because-  sql connection do not call in static method. so sql connection make the static.

syntax- static SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString);

Q.why use webmethed.

Because- Client site call, so we use the [Webmethed].

syntax-[WebMethod]

Q.why make static function. 

syntax- public static void Devesh(string A, int B, string C)  

Bescuse- function call is without object create one class to another class, so we make the static method. the function call same as the class name

Note. This function call in ajax methed in url property with aspx page name.

Read Complete

15 Aug 2017

What is sitemap



What is sitemap

A sitemap is an XML file in your webmaster tool. XML file help all URL find crawler of your blogger site.The sitemap is a complete index of


your blogger site and all post index, If you want to your blogger site top rank on google.
How to generate a sitemap for your blogger site

Sitemaps can be generate in different ways depend on the platform. you are using platform for your website For example, if yo what to add sitemap blogger


then some concepts are

Step.1 you Register account google webmaster.

Step2. Add own site google webmaster.


step3. Goto the webmaster dashboard.


step4. click the crowl and click the sitemap.

step5. Add site in sitemap.

Step6.OK

Read Complete

How to Add Robots.txt file in blogger

What is Robots.txt.

Every blogger site you create the post on your site ,robots.txt file is auto-generated by blogger.the purpose of robost.text file 
is croawler etc. sen by search engines like Google,yahoo,bing, about your blogger structure, and your blogger site all post crawled and index
in search enginnes. 


Where is located Robots.txt.

Step1. you can find Robots.txt file, you Goto the blogger.com dashboard ==> Setting ==>Search engine Preference ==> Crawler and indexing

==>Custom robots.txt ==> click on Edit.




Step2.

Code blow is-

User-agent: Mediapartners-Google
Disallow: 

User-agent: *
Disallow: /search
Allow: /

Sitemap: http://www.abcbblogger.com/sitemap.xml

User-agent: Mediapartners-Google- If you wanna to our site is crowling and Adsense create then this is most importent part of your site. but if you do'nt want to Adsense
you can removed both this lines.

User-agent- this is robots and crawlers.


Disallow: /search- If your page level result like as http://www.rockprogrammer.com/search/label/Asp%20.Net will never crowled and indexed.


Allow:- By default crowled home page keyword Allow.


Sitemap- Robots.txt is a straightforward content document that is set on your site's root catalog. 

Adding Custom robost.txt to blogger.

Step1. sign in  to your site blogger account.

Step.2.  Setting ==>Search engine Preference ==> Crawler and indexing
==>Custom robots.txt ==> click on Edit.

Step.3. click the edit button then select the yes .

Step4.  plese the past you cade.

User-agent: Mediapartners-Google
Disallow: 

User-agent: *
Disallow: /search
Allow: /

Sitemap: http://www.abcbblogger.com/sitemap.xml

step.5  save the button.

Read Complete

Popular Posts

Popular Posts

Translate

Total Pageviews