tag:blogger.com,1999:blog-16353297065635049932024-03-17T02:25:38.468-07:00Dotnet Study MaterialAnonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.comBlogger113125tag:blogger.com,1999:blog-1635329706563504993.post-56915586865694545442014-05-01T08:28:00.001-07:002014-05-01T08:39:55.462-07:00Assembly in asp.net<div dir="ltr" style="text-align: left;" trbidi="on">
<title>asp dot net interview questions and answers for experienced</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
text-align: justify;
}
</style>
<br />
<div id="font">
<b><span style="color: #0b5394;">Assembly
:-</span> </b>Assemblies are the building blocks of .NET Framework applications;
they form the fundamental unit of deployment, version control, reuse,
activation scoping, and security permissions Assembly is unit
of deployment like EXE or a DLL.<br />
<br />
<span style="color: #0b5394;">OR</span><br />
<br />
An assembly
consists of one or more files (dlls, exe's, html files etc.), and
represents a group of resources, type definitions, and
implementations of those types. An assembly may also contain
references to other assemblies. These resources, types and references
are described in a block of data called a manifest. The manifest is
part of the assembly, thus making the assembly self-describing. <br />
<br />
An
assembly is completely self-describing.An assembly contains metadata
information, which is used by the CLR for everything from type
checking and security to actually invoking the components methods. As
all information is in the assembly itself, it is independent of
registry. This is the basic advantage as compared to COM where the
version was stored in registry. <br />
<br />
<span style="color: #0b5394;"><b>There are two
types of assembly</b></span><br />
<br />
<span style="color: #0b5394;"><b> Private and Public assembly.</b></span>
<span style="color: #0b5394;"><b>Private assemble
:-</b></span> A private assembly used in single application and is stored in the
application's directory, or a sub-directory beneath.
The dll or exe
which is sole property of one application only. It is generally
stored in application root folder
<span style="color: #0b5394;"><b> </b></span><br />
<br />
<span style="color: #0b5394;"><b>Public assembly/Shared assembly :
-</b></span> A shared assembly is normally stored in the global assembly cache,
which is a repository of assemblies maintained by the .NET runtime.<br />
It is a dll which
can be used by multiple applications at a time. A shared assembly is
stored in <b>GAC</b>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com181tag:blogger.com,1999:blog-1635329706563504993.post-47797950879191990742014-04-13T00:57:00.001-07:002014-04-19T11:36:15.308-07:00jQuery Menu<div dir="ltr" style="text-align: left;" trbidi="on">
<title>jQuery Menu</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Categories :-</b></span> <a href="http://www.dotnetnukes.blogspot.in/2013/04/create-simple-drop-down-menu-using.html" target="_blank">Drop down menu using jquery</a>,<a href="http://www.dotnetnukes.blogspot.in/2013/04/create-simple-drop-down-menu-using.html" target="_blank">JQuery Mneu</a>,<a href="http://dotnetnukes.blogspot.in/2013/04/jquery-restrict-to-allow-only-numbers.html" target="_blank">JQuery Restrict to Allow Only Numbers in Textbox in Asp.net </a><br />
<br />
<b><span style="color: #0b5394;">Introduction :-</span></b> In this article i am explain how i can design header using <a href="http://dotnetnukes.blogspot.in/search/label/Jquery" target="_blank">jquery</a> in asp.net.<br />
<br />
<span style="color: #0b5394;"><b>Description :-</b> </span>In my previous article i have explained how we can create <a href="http://dotnetnukes.blogspot.in/2014/03/jquery-lightbox-in-aspnet.html" target="_blank">jquery lightbox in asp.net</a> .Now i have explained how we can make a stylish menu using <a href="http://dotnetnukes.blogspot.in/search/label/Jquery" target="_blank">jquery</a> in asp.net as shown below.<br />
<br />
<a name='more'></a><br /><br />
<b><span style="color: #0b5394;">Step 1 :- </span></b>Create a new asp.net website.<br />
<span style="color: #0b5394;"><b>Step 2 :- </b></span> Write Click on Project explorer and add new item in your project and give a name to the asp.net web page.<br />
<span style="color: #0b5394;"><b>Step 3 :- </b></span> Write a code as shown below in .aspx page.<br />
</div>
<div id="font">
<div style="background: #F5FAFF; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head runat="server"><br />
<title>jQuery menu</title><br />
<script src="http://code.jquery.com/jquery-1.8.2.js" type="text/javascript"></script><br />
<script type="text/javascript" src="http://dev.css-zibaldone.com/js/jquery/plugins/jquery.easing.js"></script><br />
<script type="text/javascript"><br />
$(function () {<br />
$('li', '#navigation').each(function () {<br />
var $li = $(this);<br />
var $a = $('a', $li);<br />
$a.hover(function () {<br />
$a.stop(true, true).animate({<br />
height: '3em',<br />
lineHeight: '3em',<br />
bottom: '1em'<br />
}, 'slow', 'easeOutBounce');<br />
}, function () {<br />
$a.stop(true, true).animate({<br />
height: '2em',<br />
lineHeight: '2em',<br />
bottom: 0<br />
}, 'slow', 'easeOutBounce');<br />
});<br />
});<br />
});<br />
</script><br />
<style type="text/css"><br />
#form1 #navigation {<br />
height: 4em;<br />
margin: 0;<br />
padding: 0 1em;<br />
list-style: none;<br />
border-bottom: 2px solid #0270BF;<br />
}<br />
#form1 #navigation li {<br />
height: 100%;<br />
float: left;<br />
margin-right: 0.5em;<br />
}<br />
#form1 #navigation a {<br />
float: left;<br />
height: 2em;<br />
padding: 0 1em;<br />
background: #0270BF;<br />
color: #fff;<br />
line-height: 2;<br />
text-transform: uppercase;<br />
font-weight: bold;<br />
text-decoration: none;<br />
margin: 2em 0 0 0;<br />
letter-spacing: 0.1em;<br />
position: relative;<br />
}<br />
#form1 #navigation a:hover {<br />
background: #F86000;<br />
}<br />
</style><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<ul id="navigation"><br />
<li><a href="#">Home</a></li><br />
<li><a href="#">About us</a></li><br />
<li><a href="#">Contact</a></li><br />
<li><a href="#">Product List</a></li><br />
<li><a href="#">Carrer</a></li><br />
<br />
</ul><br />
</div><br />
</form><br />
</body><br />
</html></div>
<br />
Output as shown below<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_LVMnxoXYToECxp013VdKFuAfo1aABgMlF4e_C_vqOemYPGssb4wNCdJGIilqdYBW9afp4sWfkiMeZ4RlSPr8TCLKOVhgNDVfSlDbC77OAVVjBKPsBPhlOSI532TIhdHqls98gNPoNAI/s1600/jquery_menu2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_LVMnxoXYToECxp013VdKFuAfo1aABgMlF4e_C_vqOemYPGssb4wNCdJGIilqdYBW9afp4sWfkiMeZ4RlSPr8TCLKOVhgNDVfSlDbC77OAVVjBKPsBPhlOSI532TIhdHqls98gNPoNAI/s1600/jquery_menu2.png" height="35" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 10pt;"><span class="IL_AD" id="IL_AD4">Download sample</span> code attached</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://app.box.com/s/8hdyuy947dqdgn8fepx1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img alt=" aspdotnet stylish menu_2 with example" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhojxuRX3ah_hLDDYYKBfuePKekozECe2WiRkvWI90CuyTQbZnnmH9gC4IdXGhguF70Qc7a1ExOz4EP9blbOA9SQLMdw82Y6Iuzb-p-HIk6o3gQ9p4VBzsfQlyCUebKrGZB7UH7gUh5n2_i/s1600/Download.png" /></a></div>
<br />
<br />
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com1tag:blogger.com,1999:blog-1635329706563504993.post-87466032205982463122014-04-04T11:38:00.002-07:002014-04-09T12:43:47.088-07:00Jquery Menu Animation in Asp.net<div dir="ltr" style="text-align: left;" trbidi="on">
<title>c# .net interview question answers</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Categories :-</b></span><a href="http://dotnetnukes.blogspot.in/2013/03/jquery-and-javascript.html" target="_blank">What is JQuery</a> , <a href="http://dotnetnukes.blogspot.in/2013/03/difference-between-java-script-and.html" target="_blank">Different between Jquery and javascript</a> , <a href="http://dotnetnukes.blogspot.in/2013/03/javascript-get-user-ip-address-latitude.html" target="_blank">JQuery get user ip address</a> , <a href="http://dotnetnukes.blogspot.in/2013/03/jquery-in-aspnet.html" target="_blank">Jquery example using asp.net</a><br />
<br />
<span style="color: #0b5394;"><b>Introduction :-</b></span> In this article i am explained how to create a animated menu in asp.net. This is very nice and easy article for design a animation in menu.<br />
<br />
<a name='more'></a><br />
<br />
<span style="color: #0b5394;"><b>Description :- </b></span>I have already explained many article related to jquey in asp.net. Now we will learn how to design animated article in asp.net following step as shown below.<br />
<br />
<span style="color: #0b5394;"><b>Step 1 :- </b></span> Open visual stdio-> create a new website->write click on project explorer add new item<br />
<br />
<span style="color: #0b5394;"><b>step 2 :-</b></span> Copy the Following code and past in your .aspx page as shown below<br />
<br />
<br />
<div style="background: #F5FAFF; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head runat="server"><br />
<title>Jquery Menu Animation in Asp.net || Menu Animation in Asp.net Using Jquery </title><br />
<style type="text/css"><br />
li<br />
{<br />
border:1px solid black;<br />
padding:15px 15px 15px 15px;<br />
width:100px;<br />
background-color: Maroon;<br />
color:White;<br />
cursor:pointer;<br />
}<br />
a { color:White; font-family:Tahoma; }<br />
</style><br />
<script type ="text/javascript" src="js/jquery-1.4.4.min.js"><br />
</script><br />
<br />
<script type="text/javascript"><br />
$(function () {<br />
$("ul.level1 li").hover(function () {<br />
$(this).stop().animate({ opacity: 0.7, width: "170px" }, "slow");<br />
}, function () {<br />
$(this).stop().animate({ opacity: 1, width: "110px" }, "slow");<br />
});<br />
});<br />
</script><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div id ="menu"><br />
<asp:Menu ID="Menu2" runat="server" Orientation="Horizontal" RenderingMode="List"><br />
<Items><br />
<asp:MenuItem NavigateUrl="" ImageUrl="" Text="Home" Value="Home" /><br />
<asp:MenuItem NavigateUrl="" ImageUrl="" Text="About Us" Value="AboutUs" /><br />
<asp:MenuItem NavigateUrl="" ImageUrl="" Text="Products List" Value="Products List" /><br />
<asp:MenuItem NavigateUrl="" ImageUrl="" Text="Contact Us" Value="ContactUs" /><br />
<asp:MenuItem NavigateUrl="" ImageUrl="" Text="Carrer" Value="Carrer" /><br />
<asp:MenuItem NavigateUrl="" ImageUrl="" Text="Feedback" Value="Feedback" /><br />
</Items><br />
</asp:Menu> <br />
<br />
</div><br />
</form><br />
</body><br />
</html></div>
<div id="font">
</div>
<br />
Output as shown below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPOdxd5jX4UjbLhLWnLf5ZbXo-q1CFcaeGqNurQHiT4bpsHiIM74Gtc0YpbflYSAjShD3eoLLhZapMR3A5FpnD5slaF035XXrD0KPLuxmAt4Cl8I4rToTjwRoCYkxByZewcX5nkNV3wB0l/s1600/jquerymenuaspdotnet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPOdxd5jX4UjbLhLWnLf5ZbXo-q1CFcaeGqNurQHiT4bpsHiIM74Gtc0YpbflYSAjShD3eoLLhZapMR3A5FpnD5slaF035XXrD0KPLuxmAt4Cl8I4rToTjwRoCYkxByZewcX5nkNV3wB0l/s1600/jquerymenuaspdotnet.png" height="39" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 10pt;"><span class="IL_AD" id="IL_AD4">Download sample</span> code attached</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://app.box.com/s/1bdkswmrp54er0pegcju" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img alt=" Jquery menu design in asp.net" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhojxuRX3ah_hLDDYYKBfuePKekozECe2WiRkvWI90CuyTQbZnnmH9gC4IdXGhguF70Qc7a1ExOz4EP9blbOA9SQLMdw82Y6Iuzb-p-HIk6o3gQ9p4VBzsfQlyCUebKrGZB7UH7gUh5n2_i/s1600/Download.png" /></a></div>
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-39096286223086824052014-04-01T10:22:00.001-07:002014-04-01T10:22:14.323-07:00How to change package name in android eclipse<div dir="ltr" style="text-align: left;" trbidi="on">
<title>How to change package name in android eclipse</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
I have an Android project created in eclipse.I want to modify the package name and application of the project.How to do that in eclipse?<br />
<br />
<b><span style="color: #0b5394;">Step 1 </span></b>:- Open eclipse IDE and <br />
<br />
Right click the project and select Android Tools >> Rename
Application Package. as shown below image<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYwXGrR1HX6oZj2aw-sRrpM1dmqz7k6HSc_25oiEC_SDRN9kbQbHFAsIZuzyGeeQWuaoNPCBHvt0pQiM0nNPC-TPWCNI8AKu4BpT8a1elVJqCR2QgE1kvDYVL03qPy0B0F-koiZ4ZoExyw/s1600/android+change+package+name.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYwXGrR1HX6oZj2aw-sRrpM1dmqz7k6HSc_25oiEC_SDRN9kbQbHFAsIZuzyGeeQWuaoNPCBHvt0pQiM0nNPC-TPWCNI8AKu4BpT8a1elVJqCR2QgE1kvDYVL03qPy0B0F-koiZ4ZoExyw/s1600/android+change+package+name.png" height="224" width="640" /></a></div>
<br />
<br />
<b><span style="color: #0b5394;">Step 2 </span></b>:- Enter the new Package name <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyiWEMLEU8bqp8k6WgI2INCXCOMvwRYDm_4e0rqZ-SuHr2q53WMqiTy8MgUUlLdz1OtfjOpSmTZeJfO2d2ksIZdzDdSCVHaMdAVtXEhd055-F8oQD-Taim6kLgDATDbaz9ermJFRUiQYPi/s1600/android+change+package+name_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyiWEMLEU8bqp8k6WgI2INCXCOMvwRYDm_4e0rqZ-SuHr2q53WMqiTy8MgUUlLdz1OtfjOpSmTZeJfO2d2ksIZdzDdSCVHaMdAVtXEhd055-F8oQD-Taim6kLgDATDbaz9ermJFRUiQYPi/s1600/android+change+package+name_2.png" height="147" width="400" /></a></div>
<br />
<b><span style="color: #0b5394;">Step 3</span></b> :-And click ok appear new windows in front of you as shown below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOf34PbLNDwAVHjrI6FvIcQ81fAg0GGC2mdfm9rF3ugMRMmCN9YKqUQIV6OljeIgggY2-i59XU33lNE_hZGDydqt5DkJR7jlGO9ldGpE6tEKbzBG1CCHe2FfEwf_piDXD2tDgS-YkGPTkf/s1600/android+change+package+name_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOf34PbLNDwAVHjrI6FvIcQ81fAg0GGC2mdfm9rF3ugMRMmCN9YKqUQIV6OljeIgggY2-i59XU33lNE_hZGDydqt5DkJR7jlGO9ldGpE6tEKbzBG1CCHe2FfEwf_piDXD2tDgS-YkGPTkf/s1600/android+change+package+name_3.png" height="347" width="400" /></a></div>
<br />
Click finsh button . Accept all the automatic changes it wants to makeSay yes to update the launch configuration...</div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-82706228642642247462014-03-20T22:25:00.001-07:002014-04-09T12:48:05.332-07:00jquery lightbox in asp.net<div dir="ltr" style="text-align: left;" trbidi="on">
<title>jquery lightbox in asp.net</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
In this article i am explained how we can implement the jQuery lightbox in our site.This is very easy to implement follow the instruction below step by step <br />
<br />
jQuery scripts used in your projects. Simple show(), hide() will make this ready to use jQuery Lightbox. It’s simple and free download and easy to integrate in your projects. Below code will explain you how to make this simple jquery lightbox.<br />
<br />
<a name='more'></a><br />
<br />
<span style="color: #0b5394;"><b>Step 1 </b></span>Create a file called index.aspx <br />
<br />
<div style="background: ##F5FAFF; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head runat="server"><br />
<title>Ligh Box(http://dotnetnukes.blogspot.in) </title><br />
<br />
<link rel="stylesheet" type="text/css" href="css/style.css" /><br />
<script type="text/javascript" src="js/jquery-1.9.1.js"></script><br />
<script type="text/javascript"><br />
function load_as_lightbox() {<br />
var DocumentHeight = $(document).height();<br />
$('.as_lightbox_wrapper').css('height', DocumentHeight); // Set document height for As_Lightbox wrapper<br />
}<br />
function ShowLightBox(DivId) {<br />
$('.as_lightbox_wrapper').show(); // Show the wrapper<br />
$('#' + DivId + '').show('slow'); // Show the Lightbox div, you can use another jQuery view functions such as fadeIn, fadeToggle for animations<br />
}<br />
function HideLightBox(DivId) {<br />
$('.as_lightbox_wrapper').hide('slow'); // Hide the As_Lightbox wrapper<br />
$('#' + DivId + '').hide(); // Hide the div<br />
}<br />
$(document).ready(function () {<br />
load_as_lightbox(); // call this function after document loads<br />
$('#Show_Lightbox').click(function () {<br />
ShowLightBox('Simple_Lightbox'); // call the As_Lightbox show function<br />
return false;<br />
});<br />
$('#as_lightbox_close').click(function () {<br />
HideLightBox('Simple_Lightbox'); // call the As_Lightbox close function<br />
return false;<br />
});<br />
});<br />
</script><br />
<style type="text/css"><br />
.as_wrapper{<br />
font-family:Arial;<br />
color:#333;<br />
font-size:14px;<br />
padding:20px;<br />
border:2px dashed #17A3F7;<br />
width:200px;<br />
margin:0 auto;<br />
margin-top:50px;<br />
}<br />
</style><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<!-- AS_lightbox div (division) starts --><br />
<div class="as_lightbox_wrapper"></div> <!-- As_lightbox wrapper (half transparent background) --><br />
<div class="as_lightbox_container" id="Simple_Lightbox"> <!-- Set ID As_Lightbox here --><br />
<div class="as_lightbox"><br />
<div class="as_lightbox_close" id="as_lightbox_close"><br />
<img src="images/close_flat_icon.png" alt="Close Lightbox" title="Close" /><br />
</div> <!-- As_Lightbox close icon --><br />
<div class="as_clear"></div><br />
<!-- As_Lightbox contents will starts here--><br />
<p>As-Lightbox content will goes here. You can add any contents Texts, Images, Videos here. It wont conflict will other scripts Simple jQuery show(), hide() gives this lightbox</p><br />
<!-- As_Lightbox contents ends here --><br />
</div><br />
</div><br />
<!-- AS_lightbox div (division) Ends --><br />
<div class="as_wrapper"><br />
<br />
<br />
<br/><br/><br />
<center><br />
<a id="Show_Lightbox" class="as_a">Show Lightbox</a><br />
</center><br />
</div><br />
</form><br />
</body><br />
</html></div>
<div id="font">
</div>
<br />
<span style="color: #0b5394;"><b></b></span><span style="color: #0b5394;"><b>Step 2 </b></span>create a file called style.css:<br />
<br />
<div style="background: ##F5FAFF; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
body{<br />
margin:0;<br />
padding:0;<br />
font-family:Arial;<br />
}<br />
.as_clear{<br />
clear:both;<br />
}<br />
.as_a{<br />
text-decoration:underline;<br />
color:#17A3F7;<br />
cursor:pointer;<br />
}<br />
.as_lightbox_wrapper{<br />
width:100%;<br />
position:absolute;<br />
top:0;<br />
left:0;<br />
z-index:100;<br />
background:url(../images/as_popup_wrapper_bg.png);<br />
display:none;<br />
}<br />
.as_lightbox_close{<br />
position:absolute;<br />
right:0;<br />
z-index:102;<br />
height:32px;<br />
width:32px;<br />
top:-25px;<br />
right:-25px;<br />
cursor:pointer;<br />
}<br />
.as_lightbox_container{<br />
z-index:101;<br />
position:fixed;<br />
width:200px;<br />
height:200px;<br />
background:#FFF;<br />
left:31%;<br />
top:13%;<br />
padding:10px;<br />
border-radius:2px;<br />
display:none;<br />
}</div>
<div id="font">
</div>
<br />
Output as shown below at run time<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio_KviGXhLR7ck9UVpmWDlRwpiPo9sbBciqtw-CWAb0HOG795mYfBs5xWICRp7cyAr_8ARyRaKJAi5Iqa8MTFqqlbrJBeQTMVUGoQ379xEQfIEGfHyshNAGOGpCTNOkA3vcJEkcv1wQjKC/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio_KviGXhLR7ck9UVpmWDlRwpiPo9sbBciqtw-CWAb0HOG795mYfBs5xWICRp7cyAr_8ARyRaKJAi5Iqa8MTFqqlbrJBeQTMVUGoQ379xEQfIEGfHyshNAGOGpCTNOkA3vcJEkcv1wQjKC/s1600/1.png" height="179" width="320" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Click on show lightbox link then lightbox popup is shown as below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM9YrLmjVI6z2JNIKbzJVr6LlUN7DUUUWvRduJnIdaeh_8KS9PhnQGe88O2l8HWU3HvIMpWQAdRU9MygzW3h5j1-kt4HpEGx1uo3ibdl8352Jo6ENTiGLlCS4dBuRCbQiEuB1-TvWpeA8K/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM9YrLmjVI6z2JNIKbzJVr6LlUN7DUUUWvRduJnIdaeh_8KS9PhnQGe88O2l8HWU3HvIMpWQAdRU9MygzW3h5j1-kt4HpEGx1uo3ibdl8352Jo6ENTiGLlCS4dBuRCbQiEuB1-TvWpeA8K/s1600/2.png" height="313" width="320" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 10pt;"><span class="IL_AD" id="IL_AD4">Download sample</span> code attached</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://app.box.com/s/3guoyzlni5226hxht4c7" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img alt=" Jquery LightBox " border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhojxuRX3ah_hLDDYYKBfuePKekozECe2WiRkvWI90CuyTQbZnnmH9gC4IdXGhguF70Qc7a1ExOz4EP9blbOA9SQLMdw82Y6Iuzb-p-HIk6o3gQ9p4VBzsfQlyCUebKrGZB7UH7gUh5n2_i/s1600/Download.png" /></a></div>
<br />
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-1844559012725965012014-03-09T11:01:00.002-07:002014-04-08T06:03:45.446-07:00What is cts?<div dir="ltr" style="text-align: left;" trbidi="on">
<title>What is cts? in asp.net</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
Categories -: <a href="http://dotnetnukes.blogspot.in/2013/11/role-of-clr-in-dotnet-framework.html" target="_blank">Role of CLR in Dotnet Framework</a></div>
<br />
<div id="font">
<span style="color: #0b5394;"><b>CTC -: </b></span>Cts is the component of clr through which net framework provides support for multiple languge because it contains a type system that is comman acroos all languge . two cts compliant languges do not requier type conversion when calling the code written in one languge from with in code written in anthore languge CTS provides a ease set of data type for all the languge supported by NET. frame work this means that the size of integer and long varibles is the same across all NET.compliant programng languges however each languge uses alliases for the base data type provide by CTS.for example , CTS uses the data type system .int32 to represent a 4 byte integer value; however visul basic uses the alias integer for the same whereasC# uses the alias int. this is done for the sake of clarity and simplicity.</div>
<div id="font">
<br />
<a name='more'></a><br /><br />
<span style="color: #0b5394;"><span style="background-color: white;"><b>What is cls?</b></span></span><br />
<span style="color: #3d85c6;"><b>Ans -:</b></span>common languge specifiction (CLS) ia a set of basic rules, which enable interoperabillity between two.NET-compliant languages supported by CLS can use each other's class libaries similar to their own. application programming interfaces which are designed by following the rules defined in CLS </div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-77006467976342706152013-11-29T21:56:00.000-08:002014-04-09T11:31:41.022-07:00Role of CLR in Dotnet Framework<div dir="ltr" style="text-align: left;" trbidi="on">
<title>Role of CLR in Dotnet Framework Interview Question</title><style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<script type="text/javascript">
( function() {
if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; };
var unit = {"publisher":"chintu_rathore","width":550,"height":90,"color_site_link":"FFFCFE","color_text":"FCFCFC","color_bg":"FFFFFF"};
var placement_id = window.CHITIKA.units.length;
window.CHITIKA.units.push(unit);
document.write('<div id="chitikaAdBlock-' + placement_id + '">
</div>
');
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = '//cdn.chitika.net/getads.js';
try { document.getElementsByTagName('head')[0].appendChild(s); } catch(e) { document.write(s.outerHTML); }
}());
</script>
<br />
<div id="font">
1 ) CLR Provides an environment to execute .Net Applications on target machines.<br />
<br />
2) CLR is also a common runtime environment for all .NET code irrespective of their programming language, because the compilers of .NET framework convert every source code into a common language known a MSIL<br />
3) CLR also provide various services to execute processes, such as memory management service and security services, CLR performs various tasks to manage the execution process of .NET application.<br />
<br />
<b><span style="color: #0b5394;">The list of CLR as shown below.....</span></b><br />
<br />
<b><span style="color: #0b5394;">Automatics memory management -></span></b> CLR invokes various built-in-functions of .NET framework to allocate and de- allocate the memory of .NRT object.<br />
<br />
<span style="color: #0b5394;"><b>Garbage Collection -></b></span> Garbage Collection is the major role of CLR, which prevents memory leaks during execution of program. The Garbage collector of CLR automatically determines the best time to free the memory, which is reserved by an object for execution .<br />
<br />
<span style="color: #0b5394;"><b>Code Access Security -></b></span> Code Access Security(CAS) model is used in .NET framework to impose restrictions and security during execution of programs.<br />
<br />
<span style="color: #0b5394;"><b>Code Verification -></b></span> CLR enforces type safety and prevents a source code from performing illegal operations, such as accessing invalid memory location.<br />
<br />
<span style="color: #0b5394;"><b>JIT compilation of .NET code -></b></span> CLR uses the services of the just-in-time(JIT) compiler to load MSIL code on traget machine for execution.<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-36632353029820386692013-10-21T12:47:00.000-07:002014-04-09T11:32:03.603-07:00What are the core components of .NET framework<div dir="ltr" style="text-align: left;" trbidi="on">
<title>What are the core components of .NET framework</title><style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<br />
<div id="font">
<span style="color: #0b5394;"><b>Categories :-</b></span> <a href="http://dotnetnukes.blogspot.in/2013/10/what-are-benefits-of-net-framework.html" target="_blank">Benefits of net framework</a> , <a href="http://dotnetnukes.blogspot.in/2013/03/interview-questions-and-answers.html" target="_blank">HR interview question and answer</a> , <a href="http://dotnetnukes.blogspot.in/2013/02/interview-questions-and-answers-for-1.html" target="_blank">1-year-exp-asp.net interview question and answer</a> , <a href="http://dotnetnukes.blogspot.in/2013/02/interview-questions-and-answers-2.html" target="_blank">Interview questions and answers for 2 years</a> , <a href="http://dotnetnukes.blogspot.in/2013/02/basic-aspnet-and-c-interview-question.html" target="_blank">C# interview Question And Answer </a><br />
<br />
The Two Components of .NET Framework are<br />
1) Common Language Run time [CLR]<br />
2) .Net Framework class Library<br />
<br />
Other key components of .NET Framework:<br />
<br />
NET Framework Class Library<br />
<br />
3) Dynamic Language Runtimes (DLR)<br />
4 ) Application Domains<br />
5) Runtime Host<br />
6) Common Type System<br />
7) Metadata and Self-Describing Components<br />
8) Cross-Language Interoperability<br />
9) NET Framework Security<br />
10) Profiling<br />
Side-by-Side Execution <br />
<span style="color: #0b5394;"><br /></span>
<span style="color: #0b5394;"><span style="background-color: #f3f3f3;"><b>Briefly describe MSIL</b></span></span><br />
<br />
.Net Framework is shipped with compilers of all programming languages to develop programs. There are separate compilers for the visual basic,C#, and visual c++ programming languages in .Net Framework.Each .Net compiler produces code after compiling the source code. The intermediate code is common for all languages and is understandable only to .NET environment. This intermediate is know as MSIL.<br />
<br />
MSIL file is executable file that can transferred various machines. Therefore, it is said that MSIL file are portable to nay machine.</div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-63143967215688339912013-10-14T02:14:00.001-07:002013-10-14T02:15:50.070-07:00What are the benefits of net framework<div dir="ltr" style="text-align: left;" trbidi="on">
<title>What are the benefits of net framework</title><style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
Categories :- <br />
<br />
.Net framework offers many benefits to application developers.some of this benefits are as follow :<br />
<br />
<span style="color: #0b5394;"><b> 1) Consistent programming model :- </b></span><br />
Dot net framework provide consistent object oriented programming model across various language.You can use the model to create a program s for performing different task, such as connecting to and retrieving data from database and reading from and writing to files.<br />
<br />
<span style="color: #0b5394;"><b>2) Language interoperability :- </b></span><br />
<span style="color: #0b5394;"><b> </b></span>Language interoperability is a feature that enables a piece of code written in one language to be used in another language.This facilities the reuse of code and therefore improves the efficiency of the development process.<br />
<br />
<span style="color: #0b5394;"><b>3) Automatic management of resources :-</b></span><br />
<span style="color: #0b5394;"><b> </b></span>While developing .NET application. You may use various resources, such as files, memory, and database connections. with .NET Framework, you do not need to manually free these resources when they are no longer required <br />
<br />
<span style="color: #0b5394;"><b>4) Easy of deployment :- </b></span><br />
<span style="color: #0b5394;"><b> </b></span>.NET Framework makes the deployment of application easier. To install an application that is not based on .NET Framework, you need to copy it and its components on target computers. However, with .NET Framework, you can quickly install or deploy the application such that installation of new application or components does not affect the existing application.<br />
<br />
<span style="color: #0b5394;"><b>5)</b></span> HTML code and source code is separate so modification is essay .<br />
<br />
<span style="color: #0b5394;"><b>6)</b></span> Asp.net Framework is language independent.<br />
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-49165480217933970522013-10-12T22:32:00.002-07:002013-10-13T07:00:19.579-07:00How to get xml data into grid view in asp.net<div dir="ltr" style="text-align: left;" trbidi="on">
<title>How to get xml data into grid view</title><style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Introduction :-</b></span> In this article i have explain how to show XML file data in asp.net grid-view .<br />
<br />
<span style="color: #0b5394;"><b>Description :-</b></span> In my previous post i have explained <a href="http://dotnetnukes.blogspot.in/2013/10/generating-xml-file-from-mysql-database.html" target="_blank">How to Generating XML file From MySQL database</a> <br />
<a href="http://dotnetnukes.blogspot.in/2013/10/generating-xml-file-from-mysql-database.html" target="_blank">Create and read XML file in asp.net</a> , <a href="http://dotnetnukes.blogspot.in/2013/06/read-data-from-xml-file-in-aspnet.html" target="_blank">Read data from XML file in asp.net </a>, now i have explain how to show XML file data in grid view using <a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" target="_blank">asp.net</a><br />
<br />
<span style="color: #0b5394;"><b>Step 1 :-</b></span> Create a new asp.net web site.<br />
<span style="color: #0b5394;"><b>Step 2:-</b></span> Add a new page in your project and give the name to the page gridxml.aspx..<br />
<span style="color: #0b5394;"><b>Step 3 :-</b></span> Add one xml file and write something like this which you want to show on gridview page of asp.net as show below.<br />
<br />
<span style="color: #0b5394;"><b>Note -</b></span> This is a Employees.xml file already exist in your project.<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<?xml version="1.0" standalone="yes"?><br />
<Employees><br />
<Employee><br />
<EmployeeID>Chitranjan</EmployeeID><br />
<CompanyName>abc informatics</CompanyName><br />
<ContactName>chintu </ContactName><br />
<ContactTitle>Developer</ContactTitle><br />
<Address>ganraj</Address><br />
<City>Indore</City><br />
<PostalCode>452001</PostalCode><br />
<Country>India</Country><br />
<Phone>00000000</Phone><br />
<Fax>4545499</Fax><br />
</Employee><br />
<Employee><br />
<EmployeeID>Aman</EmployeeID><br />
<CompanyName>Y N Info</CompanyName><br />
<ContactName>Aman</ContactName><br />
<ContactTitle>Artiest</ContactTitle><br />
<Address>Boriwali east</Address><br />
<City>Pune</City><br />
<PostalCode>3436</PostalCode><br />
<Country>India</Country><br />
<Phone>9549544345</Phone><br />
<Fax>559935</Fax><br />
</Employee><br />
<Employee><br />
<EmployeeID>Rahul</EmployeeID><br />
<CompanyName>Gold Main</CompanyName><br />
<ContactName>Hot</ContactName><br />
<ContactTitle>Designer</ContactTitle><br />
<Address>dfdf</Address><br />
<City>bBombay</City><br />
<PostalCode>5434546</PostalCode><br />
<Country>India</Country><br />
<Phone>54545</Phone><br />
</Employee><br />
<Employee><br />
<EmployeeID>Ronak</EmployeeID><br />
<CompanyName>Yeswant Niwas</CompanyName><br />
<ContactName>Golo</ContactName><br />
<ContactTitle>Producer</ContactTitle><br />
<Address>345 Alock Nagar</Address><br />
<City>Bhopal</City><br />
<PostalCode>554677</PostalCode><br />
<Country>India</Country><br />
<Phone>5656</Phone><br />
<Fax>0909ASD</Fax><br />
</Employee><br />
<Employee><br />
<EmployeeID>Ravi</EmployeeID><br />
<CompanyName>DFF</CompanyName><br />
<ContactName>LJ</ContactName><br />
<ContactTitle>PPOIU</ContactTitle><br />
<Address>79879 JKJK</Address><br />
<City>ABC</City><br />
<PostalCode>6656DF</PostalCode><br />
<Country>RFF</Country><br />
<Phone>54554FGGG</Phone><br />
<Fax>GGG555</Fax><br />
</Employee><br />
<Employee><br />
<EmployeeID>JJ8</EmployeeID><br />
<CompanyName>HJKGJ8</CompanyName><br />
<ContactName>GGH55</ContactName><br />
<ContactTitle>New Dehli</ContactTitle><br />
<Address>Rambag</Address><br />
<City>ASD</City><br />
<PostalCode>87GG</PostalCode><br />
<Country>India</Country><br />
<Phone>7667654</Phone><br />
<Fax>FGH45</Fax><br />
</Employee><br />
<Employee><br />
<EmployeeID>Sumit</EmployeeID><br />
<CompanyName>Sumo tech</CompanyName><br />
<ContactName>Sumo</ContactName><br />
<ContactTitle>Manager</ContactTitle><br />
<Address>656 FFH</Address><br />
<City>Strasbourg</City><br />
<PostalCode>8788</PostalCode><br />
<Country>Noida</Country><br />
<Phone>665-778-545</Phone><br />
<Fax>545.54.55</Fax><br />
</Employee><br />
<br />
</Employees></div>
<span style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"><br /></span>
<span style="color: #0b5394;"><b> Step 4 :-</b></span> open the gridxml.aspx file and write the code as show below.<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Data;<br />
<br />
public partial class CS : System.Web.UI.Page<br />
{<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!this.IsPostBack)<br />
{<br />
this.BindGrid();<br />
}<br />
}<br />
<br />
private void BindGrid()<br />
{<br />
using (DataSet ds = new DataSet())<br />
{<br />
ds.ReadXml(Server.MapPath("~/Employees.xml"));<br />
GridView1.DataSource = ds;<br />
GridView1.DataBind();<br />
}<br />
}<br />
<br />
protected void OnPageIndexChanging(object sender, GridViewPageEventArgs e)<br />
{<br />
GridView1.PageIndex = e.NewPageIndex;<br />
this.BindGrid();<br />
}<br />
}</div>
<span style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"><br /></span>
<span style="color: #0b5394;"><b>Note -</b></span>: Source code also available in vb.net<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 10pt;"><span class="IL_AD" id="IL_AD4">Download sample</span> code attached</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://app.box.com/s/7e3rmxe3f21ao8b79dc1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhojxuRX3ah_hLDDYYKBfuePKekozECe2WiRkvWI90CuyTQbZnnmH9gC4IdXGhguF70Qc7a1ExOz4EP9blbOA9SQLMdw82Y6Iuzb-p-HIk6o3gQ9p4VBzsfQlyCUebKrGZB7UH7gUh5n2_i/s1600/Download.png" /></a></div>
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-36515325791652009962013-10-06T08:42:00.001-07:002014-04-09T12:50:37.960-07:00Generating Xml file From Mysql database<div dir="ltr" style="text-align: left;" trbidi="on">
<title>Generating XML FILE From MySQL database</title><style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Introduction :-</b></span> In this article i have explain how to generate XML File from mysql database in asp.net . <br />
<br />
<span style="color: #0b5394;"><b>Description :-</b></span> In my previous article i have explain <a href="http://dotnetnukes.blogspot.in/2013/06/crete-and-read-xml-file-in-aspnet.html" target="_blank">Crete and read XML file in asp.net </a> and <a href="http://dotnetnukes.blogspot.in/2013/06/read-data-from-xml-file-in-aspnet.html" target="_blank">read data from XML file in asp.net </a>. Now i am explain how to generate XML file in asp.net.<br />
<br />
<a name='more'></a><br /><br />
<span style="color: #0b5394;"><b>Step 1 :-</b></span> Create table for generate xml file using mysql database. Table structure as show below<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
CREATE TABLE `user_tab` (<br />
`ID` int(11) NOT NULL AUTO_INCREMENT,<br />
`User_Name` varchar(50) DEFAULT NULL,<br />
`Contact_No` varchar(50) DEFAULT NULL,<br />
`Donet_Values` float DEFAULT NULL,<br />
`Donate_Date` datetime DEFAULT NULL,<br />
`User_Email` varchar(50) DEFAULT NULL,<br />
PRIMARY KEY (`ID`)<br />
)</div>
<br />
GUI table structure as show below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg9Z_0-_D7Fq927QeAxbAzf_n2THaNjEIjJE6ouBm-Ce8wbDU2DYbukrjBR2R4oXbltiuGiCPwQp_58NN_3Yw2BtMre3b6yA0c46i_twiRof8Ud9M6TBtKFKfiWKAIEjdKmAc6yLaN6QAZ/s1600/3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg9Z_0-_D7Fq927QeAxbAzf_n2THaNjEIjJE6ouBm-Ce8wbDU2DYbukrjBR2R4oXbltiuGiCPwQp_58NN_3Yw2BtMre3b6yA0c46i_twiRof8Ud9M6TBtKFKfiWKAIEjdKmAc6yLaN6QAZ/s1600/3.PNG" /></a></div>
<br />
<span style="color: #0b5394;"><b>Step 2:-</b></span> create a new asp.net web application and add new page and write this code on web page as show below<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
//generat xml file and save in folder <br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
MySqlConnection con = new MySqlConnection("server=localhost;User Id=root;database=database Name;password=Your Password;Pooling=false;");<br />
con.Open();<br />
string str = "select * from slider_tab1 ";<br />
MySqlDataAdapter da = new MySqlDataAdapter(str,con);<br />
DataSet ds = new DataSet();<br />
da.Fill(ds,"Userinfo");<br />
ds.WriteXml(Server.MapPath("~/xmlfile/xml_file.xml"));<br />
lblmsg.Text = "XML File Created Successfully";<br />
<br />
}</div>
<br />
<span style="color: #0b5394;"><b>Explanation -</b></span>: Here i take a new asp.net web page and drag and drop a asp.net button and one label for show the message file is created and write this code on asp.net button click event.<br />
<br />
In this code i have selected all the data from mysql database and create a object of mysql DataAdapter and create DaSet and fill all the DataAdapter values in Dataset and save the file in xml format in xmlfile folder<br />
<br />
Note- If you use mysql database then use the mysql to asp.net connector for connect the MySQL database to asp.net</div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-58136852535717378742013-09-20T08:40:00.000-07:002013-09-20T08:41:38.818-07:00How i can run apk file on emulator<div dir="ltr" style="text-align: left;" trbidi="on">
<title>How i can run apk file on emulator</title><style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<br />
<div id="font">
<span style="color: #0b5394;"><b> Categories :</b></span> -<a href="http://dotnetnukes.blogspot.in/2013/07/how-to-call-aspnet-web-service-from.html" target="_blank"> Call asp.net web service from android application </a><br />
<br />
<span style="color: #0b5394;"><b>Introduction :-</b></span> In this article i am explain how to run any .apk file using android emulator.<br />
<br />
<span style="color: #0b5394;"><b>Description : -</b></span> In my previous article i have explained <a href="http://dotnetnukes.blogspot.in/2013/07/how-to-call-aspnet-web-service-from.html" target="_blank">call asp.net web service from android application </a> Now i am explain how to run .apk through emulator<br />
<br />
<span style="color: #0b5394;">Step 1</span> Fist Check jdk is installed i you system other wise instal the jdk<br />
<span style="color: #0b5394;">Step 2</span> Set the Environment Variable like this for windows 7<br />
Write click on my computer and go to property -> popup is open and click on Advanced System Setting ->Advanced-> Environment Varibles<br />
and set path link this image<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYtjM4OmcfrsqVfXeGJUlrxsxcUgyFMHOPJ7a_3l55iMDOYj3As8Uly9wfNSZv4MWZzROqdRoY7Buxwjic99o-5ptjJcfp7z5a22af_FiRV_cE3Gp9MFe5UsaA_FE1DskHqqUHkAiBAzJ0/s1600/set+enviromet+variable.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYtjM4OmcfrsqVfXeGJUlrxsxcUgyFMHOPJ7a_3l55iMDOYj3As8Uly9wfNSZv4MWZzROqdRoY7Buxwjic99o-5ptjJcfp7z5a22af_FiRV_cE3Gp9MFe5UsaA_FE1DskHqqUHkAiBAzJ0/s1600/set+enviromet+variable.png" /></a></div>
<br />
<br />
Note-> Click new then open this popup and enter variable name and variable values and click ok<br />
<br />
<span style="color: #0b5394;">Step 3</span> open eclipse and run any project through emulator your emulator is run properly<br />
<br />
<span style="color: #0b5394;"><b>Note -></b></span> If you have no android project then create a new android application and run the android application using emulator<br />
<br />
Step 4 Keep your .apk file within folder of your android sdk\platform-tools<br />
<br />
<span style="color: #0b5394;">Step 5 -</span> Open cmd prompt and go tto your sdk\platform-tools folder<br />
and type the command on cmd<br />
<br />
adb install your apk file name<br />
<br />
GUI as shown below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipQp67u1suhwe0pM3ryxM-FlOMcGnp6xxRrBaw9N9J5ISOs5-Dzuquwi9fF8W0PAfqjJF16Q1SofX-YekKqST8prBPI7JGQi7Rlg0qdHgh2IEOeELgb_XH40QXfTb5Vly3eg_9q_b3N162/s1600/run+apk.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="61" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipQp67u1suhwe0pM3ryxM-FlOMcGnp6xxRrBaw9N9J5ISOs5-Dzuquwi9fF8W0PAfqjJF16Q1SofX-YekKqST8prBPI7JGQi7Rlg0qdHgh2IEOeELgb_XH40QXfTb5Vly3eg_9q_b3N162/s400/run+apk.png" width="400" /></a></div>
<br />
You get success message if you .apk is install properly using command prompt <br />
<br />
<span style="color: #0b5394;">Step 6</span> - Check you Apk on you emulator is show properly and click on akp icon of your app it's run properly<br />
<br />
<div>
</div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-35157688473945456972013-08-28T08:07:00.005-07:002013-08-28T11:39:17.055-07:00How To Create A JSON Web Service In ASP.NET<div dir="ltr" style="text-align: left;" trbidi="on">
<title>How To Create A JSON Web Service In ASP.NET</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Categories : - </b><span style="color: black;"> <a href="http://dotnetnukes.blogspot.in/2013/08/creating-ajax-enabled-wcf-service-in.html" target="_blank">How to create Ajax enable wcf web service in asp.net </a></span><b><br /></b></span><br />
<span style="color: #0b5394;"><b>Introduction : -</b><span style="color: black;"> </span></span><br />
<br />
<span style="color: #0b5394;"><span style="color: black;"> .ASP.NET makes it easy to create web services but they usually return XML. Like many web developers I now prefer JSON. This article and sample code will show you how to get your web service to return data in the JSON format.</span><b> </b></span><br />
<br />
<span style="color: #0b5394;"><b>Description : -</b></span><br />
<br />
<span style="color: #0b5394;"><b> </b><span style="color: black;"> For fetch the data from MySQL database using web service in asp.net json format step as shown below.</span></span><br />
<span style="color: #0b5394;"><span style="color: black;"><br /></span></span>
<span style="color: #0b5394;"><b> </b><span style="color: black;">Step :- 1 Create a new web site </span></span><br />
<span style="color: #0b5394;"><span style="color: black;">Step : -2 Write click on website and add new web service </span></span><br />
<span style="color: #0b5394;"><span style="color: black;">Step : -3 Write a code on WebService.cs file</span></span><br />
<br />
<span style="color: #0b5394;"><span style="color: black;">as shown below</span></span><br />
<br />
<span style="color: #0b5394;"><span style="color: black;"><br />
</span></span><br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Web;<br />
using System.Web.Services;<br />
using System.Web.Script.Services;<br />
using MySql.Data.MySqlClient;<br />
using System.Data;<br />
using System.Web.Script.Serialization;<br />
/// <summary><br />
/// Summary description for WebService<br />
/// </summary><br />
[WebService(Namespace = "http://tempuri.org/")]<br />
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. <br />
// [System.Web.Script.Services.ScriptService]<br />
public class WebService : System.Web.Services.WebService {<br />
<br />
public WebService () {<br />
<br />
//Uncomment the following line if using designed components <br />
//InitializeComponent(); <br />
}<br />
<br />
[WebMethod]<br />
public string HelloWorld() {<br />
return "Hello World";<br />
}<br />
<br />
<span style="color: #38761d;">[WebMethod(Description = "Gets All Records.")]<br /><br /> [ScriptMethod(ResponseFormat = ResponseFormat.Json)]<br /><br /> public string GetAllRecords() {<br /><br /> MySqlConnection objConnection = new MySqlConnection("server=localhost;User Id=root;database=databaseName;Pooling=false;Connect Timeout=10;Allow User Variables=True;");<br /><br /> MySqlCommand objCommand = new MySqlCommand("SELECT * FROM info_tab ORDER BY id", objConnection);<br /><br /> DataSet objDataSet = new DataSet();<br /><br /> MySqlDataAdapter objDataAdapter = new MySqlDataAdapter(objCommand);<br /><br /> objDataAdapter.Fill(objDataSet, "reading");<br /><br /> objConnection.Close();<br /> // Create a multidimensional jagged array<br /> string[][] JaggedArray = new string[objDataSet.Tables[0].Rows.Count][];<br /><br /> int i = 0;<br /><br /> foreach (DataRow rs in objDataSet.Tables[0].Rows)<br /><br /> {<br /><br /> JaggedArray[i] = new string[] { rs["user_id"].ToString(), rs["First_Name"].ToString(), rs["Last_Name"].ToString() };<br /><br /> i = i + 1;<br /><br /> }<br /><br /> // Return JSON data<br /><br /> JavaScriptSerializer js = new JavaScriptSerializer();<br /><br /> string strJSON = js.Serialize(JaggedArray);<br /><br /> return strJSON;<br /><br /> } </span><br />
}</div>
<div id="font">
</div>
<span style="color: #0b5394;"><span style="color: black;"> </span></span> <br />
For Connect to my sql use the Connector .MySql Connector Download Link is <a href="http://dev.mysql.com/downloads/connector/net/5.2.html#downloads" target="_blank">Click</a><br />
<br />
Run your service and seen output like this<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3nYj-AJmlu9lRAV5tG4D6cxilxmN4IbSOlpARMGk-rZHwwv7t8DaaEoj8RXP0BxJOzmq5VEuy2BF1CLftENCkHkiKXkvqoNrEi9WvF_ojqL7hbTQcVIsvcolPUzy4lV3ANcPT8PBRM3KO/s1600/ajax+service1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3nYj-AJmlu9lRAV5tG4D6cxilxmN4IbSOlpARMGk-rZHwwv7t8DaaEoj8RXP0BxJOzmq5VEuy2BF1CLftENCkHkiKXkvqoNrEi9WvF_ojqL7hbTQcVIsvcolPUzy4lV3ANcPT8PBRM3KO/s1600/ajax+service1.png" /></a></div>
<br />
Click on <span style="color: #0b5394;">GetAlRecords </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilJqJUuttUVT6rmRUC2ftCnGjC2HKVKDgGKECtFfy_eoJO579vRWuVxnm_n-7FUoGiVw-jzXZBzBdXD-fr3F5JuwoW9XXx6NuriVxDSUXv6BGZr7Z7e-HboyLu4gF1lPnwjn9wpkxUODaN/s1600/ajax+service2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilJqJUuttUVT6rmRUC2ftCnGjC2HKVKDgGKECtFfy_eoJO579vRWuVxnm_n-7FUoGiVw-jzXZBzBdXD-fr3F5JuwoW9XXx6NuriVxDSUXv6BGZr7Z7e-HboyLu4gF1lPnwjn9wpkxUODaN/s1600/ajax+service2.png" /></a></div>
</div>
<div id="font">
<br />
<br />
<br />
Again Click on Invoke Button and output as shown below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6685igzzSVWwQkLyKRePDSjpqQKX78Wt-az_U_q7f52wApq30yzQrpDynXGtYIyHrAUzkmlZm0t0Psr9LHbJTtsN4ENSRD6pq-B5RbNlkCMfSDWbP3o99Lq3q8FdU6eyXH4hcwuQ9MVw0/s1600/ajax+service_output.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6685igzzSVWwQkLyKRePDSjpqQKX78Wt-az_U_q7f52wApq30yzQrpDynXGtYIyHrAUzkmlZm0t0Psr9LHbJTtsN4ENSRD6pq-B5RbNlkCMfSDWbP3o99Lq3q8FdU6eyXH4hcwuQ9MVw0/s1600/ajax+service_output.png" /></a></div>
<br />
<span style="color: #0b5394;"><b>Note : </b></span>- In Connection String i am not use a password If you define a password at the time of installation of MySQL database then use password=y our password; in connection string </div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-39662208318017267792013-08-23T11:53:00.000-07:002013-08-23T11:53:02.704-07:00Creating Ajax Enabled WCF Service in asp.net<div dir="ltr" style="text-align: left;" trbidi="on">
<title>Creating Ajax Enabled WCF Service in asp.net</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Categories :-</b></span><a href="http://dotnetnukes.blogspot.in/2013/05/data-contracts-and-service-contracts-wcf.html" target="_blank"> Introduction of WCF service</a> , <a href="http://dotnetnukes.blogspot.in/2013/04/introduction-to-wcf.html" target="_blank">Advantages and Disadvantages of WCf Service</a> , <a href="http://dotnetnukes.blogspot.in/2013/04/differences-between-wcf-and-aspnet-web.html" target="_blank">Difference betweenWCF service and asp.net service</a><br />
<br />
<span style="color: #0b5394;"><b>Introduction :- </b></span><br />
<br />
In my previous article i have explain to <a href="http://dotnetnukes.blogspot.in/2013/04/create-restful-wcf-service-api-using.html" target="_blank">create restful wcf service api using post step by step</a> .and i have also explained another example for <a href="http://dotnetnukes.blogspot.in/2013/05/basic-step-by-step-wcf-webservice.html" target="_blank">create basic wcf service step by step</a> in <a href="http://dotnetnukes.blogspot.in/2013/02/cnet.html" target="_blank">asp.net</a>. In this article, I will explain how to create an AJAX-enabled WCF Service and how to consume it using client-side script in an ASP.NET page. I have kept the example quiet simple so in order to keep our focus on creating and consuming AJAX Enabled WCF Services.<br />
<br />
<span style="color: #0b5394;"><b>Description :- </b></span><br />
<br />
AJAX-enabled WCF Service is a service that can be consumed using an AJAX client-side script. <br />
I am using visual stdio 2010 for create a ajax enable wcf service in asp.net.This is very easy for create wcf enable service in asp.net.Follow the step for create a ajax enable web service in asp.net as shown below<br />
<br />
Step 1 :- Open Visual Studio 2010. Go to File->New->WebSite Select ASP.NET Empty WebSite<br />
<br />
Step 2 : - Go to Solution Explorer and right-click.<br />
<br />
Select Add->New Item , Select WebForm , Default.aspx page open<br />
<br />
Step 3 : -<span style="color: #0b5394;"><b>Define WCF Service :</b></span><br />
Go to Solution Explorer and right-click.<br />
Select Add->New Item , Select AJAX Enabled WCF Service , Define the Namespace<br />
<br />
Step 4 :- Open Default.aspx page and click in [Design option].<br />
<br />
Drag and drop Scriptmanager Control on the default.aspx web form. Image of form as shown below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPKf5J57lktN-duWk4d0xEhxn9ahVqWISzDXFmfZ1pgKeiG8r9zgMbzhALsUheYxN94kbJ55oVfAGY7Tlv77vV6eXK_-rbCG2xIWlaHIlkTz7ACT7Em6D96XvtGZYrM7xnBhNQVUu2AAn9/s1600/ajax_enable+wcf+service.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPKf5J57lktN-duWk4d0xEhxn9ahVqWISzDXFmfZ1pgKeiG8r9zgMbzhALsUheYxN94kbJ55oVfAGY7Tlv77vV6eXK_-rbCG2xIWlaHIlkTz7ACT7Em6D96XvtGZYrM7xnBhNQVUu2AAn9/s1600/ajax_enable+wcf+service.PNG" /></a></div>
<br />
<br />
Step 6 : -In [design] page right-click in scriptmanager control<br />
Select Properties option<br />
Define Services like this <br />
<span style="font-family: Verdana; font-size: x-small;"></span><br />
<ul>
<li><span style="font-family: Verdana; font-size: x-small;"></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir5IP73uf5pZXjOqGSnddpaS5TA5dwoZ5nHu5VxNKo04pWD8tU2w9I0Z0yrAZ0b2IMCaZxgEPpoBokuqxhBWAC5g6z9YJv1RMxX2-7ceu91CzQFpexUsZSBVSQCZ7qRb8XpRn79E_osEKP/s1600/wcf+enabled+service+property.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir5IP73uf5pZXjOqGSnddpaS5TA5dwoZ5nHu5VxNKo04pWD8tU2w9I0Z0yrAZ0b2IMCaZxgEPpoBokuqxhBWAC5g6z9YJv1RMxX2-7ceu91CzQFpexUsZSBVSQCZ7qRb8XpRn79E_osEKP/s1600/wcf+enabled+service+property.PNG" /></a><span style="font-family: Verdana; font-size: x-small;"></span></li>
</ul>
Click the add option and select Service path like this<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj169R4En70FetDFmg9v-ZprWCJG_I4M_vcvPloZZu_urm_-5HC-p1H1xb03OXbZybn8grpej7gCNTB-54vxhPLAjRWxuBCF6-Ra_j4ylSi_NSm6dTYCJegcXwz4AoJC4gJPUt3F76sDTUh/s1600/wcf+ajax+enable+property+add.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj169R4En70FetDFmg9v-ZprWCJG_I4M_vcvPloZZu_urm_-5HC-p1H1xb03OXbZybn8grpej7gCNTB-54vxhPLAjRWxuBCF6-Ra_j4ylSi_NSm6dTYCJegcXwz4AoJC4gJPUt3F76sDTUh/s320/wcf+ajax+enable+property+add.PNG" width="320" /></a></div>
<br />
you can check this service on click on soure default.aspx design page<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<asp:ScriptManager ID="ScriptManager1" runat="server"><br />
<Services><br />
<asp:ServiceReference Path="ajax.svc" /><br />
</Services><br />
</asp:ScriptManager></div>
<div id="font">
</div>
<br />
Step7 : - You have already select AJAX Enabled WCF Service in your app_code folder .<br />
select ajax.cs webservice and double click on code behind and write the following <br />
<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
[ServiceContract(Namespace = "GreetNM")]<br />
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]<br />
public class ajax<br />
{<br />
// To use HTTP GET, add [WebGet] attribute. (Default ResponseFormat is WebMessageFormat.Json)<br />
// To create an operation that returns XML,<br />
// add [WebGet(ResponseFormat=WebMessageFormat.Xml)],<br />
// and include the following line in the operation body:<br />
// WebOperationContext.Current.OutgoingResponse.ContentType = "text/xml";<br />
[OperationContract]<br />
public void DoWork()<br />
{<br />
// Add your operation implementation here<br />
return;<br />
}<br />
[OperationContract]<br />
public string GetUser(string user)<br />
{<br />
return "Hello="+user;<br />
}<br />
<br />
}</div>
<div id="font">
</div>
<br />
<br />
Here GetUser is method called GreetUser(string uname) which takes a username and returns a string with the “Hello” greeting appended to the user name. Decorate the method with the ‘OperationContractAttribute’ to indicate that the method is a part of the contract.<br />
<br />
step 8 :- <br />
Now add a Html Button, an HTML Input box and <Div> to the
Deafult.aspx page.After renaming the controls and adding the onClick
event of the button, the markup will appear similar to the following and image as shown above as step number 6<br />
<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<div id="ajax_wcf" title="getuser"><br />
<br />
<asp:ScriptManager ID="ScriptManager1" runat="server"><br />
<Services><br />
<asp:ServiceReference Path="ajax.svc" /><br />
</Services><br />
</asp:ScriptManager><br />
<input type="button" id="ajax_wcf" onclick="return ajx_wcf_call()" value="Submit" /><br />
<input type="text" id="txtnm" /><br />
</div></div>
<div id="font">
</div>
<br />
Java Script code :<br />
<br />
Step 7 : Now go to Default.aspx page and select Design option.<br />
<br />
Click in the input Button<br />
Define Java Script code for the on click event<br />
<br />
Code :<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<script language="javascript" type="text/javascript"><br />
function ajx_wcf_call() {<br />
try {<br />
var greeto = new GreetNM.ajax();<br />
greeto.GetUser($get("txtnm").value, OnGeetingComplet, OnError);<br />
<br />
} catch (Error) { <br />
alert("Error");<br />
}<br />
}<br />
<br />
function OnGeetingComplet(result)<br />
{<br />
$get("txtnm").value = result;<br />
alert(result);<br />
}<br />
<br />
function OnError(result) {<br />
alert(result.get_message());<br />
}<br />
<br />
</script></div>
<div id="font">
</div>
<br />
Compete code as shown below<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head runat="server"><br />
<title></title><br />
<script language="javascript" type="text/javascript"><br />
function ajx_wcf_call() {<br />
try {<br />
var greeto = new GreetNM.ajax();<br />
greeto.GetUser($get("txtnm").value, OnGeetingComplet, OnError);<br />
<br />
} catch (Error) { <br />
alert("Error");<br />
}<br />
}<br />
<br />
function OnGeetingComplet(result)<br />
{<br />
$get("txtnm").value = result;<br />
alert(result);<br />
}<br />
<br />
function OnError(result) {<br />
alert(result.get_message());<br />
}<br />
<br />
</script><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div id="ajax_wcf" title="getuser"><br />
<br />
<asp:ScriptManager ID="ScriptManager1" runat="server"><br />
<Services><br />
<asp:ServiceReference Path="ajax.svc" /><br />
</Services><br />
</asp:ScriptManager><br />
<input type="button" id="ajax_wcf" onclick="return ajx_wcf_call()" value="Submit" /><br />
<input type="text" id="txtnm" /><br />
</div><br />
</form><br />
</body><br />
</html></div>
<div id="font">
</div>
<br />
The result as for enter the value in text box and click on button <br />
<span id="goog_314851059"></span><span id="goog_314851060"></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4wFEw7kEWTcrlez5s4QuIzSUBvjH_FRHdbMdbpDwMsytMntv3ZGhrGhTq25DuogkoKokjjb3r9NBaRvL5_Zgtfx2UMJswX0LVokIxQQSEyt4f7DlevBgZa7Q9AI_F1LuPg-_vbl7E7NoO/s1600/wcf+ajax+enable+output.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4wFEw7kEWTcrlez5s4QuIzSUBvjH_FRHdbMdbpDwMsytMntv3ZGhrGhTq25DuogkoKokjjb3r9NBaRvL5_Zgtfx2UMJswX0LVokIxQQSEyt4f7DlevBgZa7Q9AI_F1LuPg-_vbl7E7NoO/s1600/wcf+ajax+enable+output.PNG" /></a></div>
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 10pt;"><span class="IL_AD" id="IL_AD4">Download sample</span> code attached</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://app.box.com/s/tdqm5bctslwnn4tjk50s" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhojxuRX3ah_hLDDYYKBfuePKekozECe2WiRkvWI90CuyTQbZnnmH9gC4IdXGhguF70Qc7a1ExOz4EP9blbOA9SQLMdw82Y6Iuzb-p-HIk6o3gQ9p4VBzsfQlyCUebKrGZB7UH7gUh5n2_i/s1600/Download.png" /></a></div>
<br />
</div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-68938004772792293742013-08-14T23:04:00.001-07:002014-04-10T00:18:24.214-07:00Could not find file exception in asp.net fileupload<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: #0b5394;"><b>Categories : -</b></span> <a href="http://www.dotnetnukes.blogspot.in/2013/06/crete-and-read-xml-file-in-aspnet.html" target="_blank">Create and read XML file in asp.net</a> , <a href="http://www.dotnetnukes.blogspot.in/2013/06/adonet-interview-questions-and-answers.html" target="_blank">Interview question and answer</a> , <a href="http://www.dotnetnukes.blogspot.in/2013/08/regular-expression-validator-for-image.html" target="_blank">Regular expression image validation</a> ,<a href="http://www.dotnetnukes.blogspot.in/2013/07/how-to-allow-only-numeric-values-into.html" target="_blank"> Regular expression text box validate for numeric value only</a><title>Could not find file exception in asp.net fileupload</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<br />
<span style="color: #0b5394;"><b>Introduction :-</b></span> <br />
<br />
In this article i am explain how to avoid error file cloud not find when upload any image in folder using asp.net web form .<br />
<br />
Error As shown below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_52ubigbOC24LfAR29F8Im6CQZQwlSj04LcRD1JpGkGhtoQMkKwPCWluepkOjOJVOpfX0N_mpvswoohPCpSMaxjJpIJM-F16liO15wsnY5fj4wbAXg_Fkq4tpDWfRwqR1awYv2n5Mw2aV/s1600/could+not_file.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_52ubigbOC24LfAR29F8Im6CQZQwlSj04LcRD1JpGkGhtoQMkKwPCWluepkOjOJVOpfX0N_mpvswoohPCpSMaxjJpIJM-F16liO15wsnY5fj4wbAXg_Fkq4tpDWfRwqR1awYv2n5Mw2aV/s400/could+not_file.PNG" height="90" width="400" /></a></div>
<span style="color: #0b5394;"><b></b></span><br />
<a name='more'></a><span style="color: #0b5394;"><b><br /></b></span>
<span style="color: #0b5394;"><b>Description : - </b></span><br />
<br />
<span style="color: #0b5394;"><b> </b></span>In my Previous article i have explained <a href="http://www.dotnetnukes.blogspot.in/2013/08/regular-expression-validator-for-image.html" target="_blank">how to upload only image in .png,.jpeg format.</a> Now I am explain how to solve the server error could not find file when file is uploaded in image folder using file upload control of <a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" target="_blank">asp.net</a>.<br />
<br />
<span style="color: #0b5394;"><b>Solution :- </b></span><br />
<br />
Use <span style="color: #073763;">Server.MapPath</span> for upload file in folder. Process for upload file on server side as shown below.<br />
<br />
Create a new website and add new web Form .give the name to the web Form <span style="color: #cc0000;">fileupload.aspx</span> .And drag and drop a new asp.net file <span style="color: #cc0000;">upload control</span> and asp.net button control. and double click on button that means on code behind side write this code on button click event. <br />
<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
string image1 = File1.FileName.ToString();<br />
string imgPath1 = "~/image/"+ image1;<br />
File1.SaveAs(<span style="color: #cc0000;">Server.MapPath</span>(imgPath1));<br />
}</div>
</div>
<div id="font">
</div>
<div id="font">
<br />
<br />
Here "~/image/" virtual path of the image folder. <br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 10pt;"><span class="IL_AD" id="IL_AD4">Download sample</span> code attached</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://app.box.com/s/3kih1dnyu1ie2vj95p8l" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhojxuRX3ah_hLDDYYKBfuePKekozECe2WiRkvWI90CuyTQbZnnmH9gC4IdXGhguF70Qc7a1ExOz4EP9blbOA9SQLMdw82Y6Iuzb-p-HIk6o3gQ9p4VBzsfQlyCUebKrGZB7UH7gUh5n2_i/s1600/Download.png" /></a></div>
<br />
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com1tag:blogger.com,1999:blog-1635329706563504993.post-56020442054683502202013-08-09T09:04:00.001-07:002013-08-09T09:04:17.731-07:00GridView Paging Not Displaying Data After Switching Page<div dir="ltr" style="text-align: left;" trbidi="on">
<title>GridView Paging Not Displaying Data After Switching Page</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 13pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Categories : -</b></span> T<a href="http://dotnetnukes.blogspot.in/2013/08/the-gridview-gridview1-fired-event.html" target="_blank">he GridView 'GridView1' fired event PageIndexChanging which wasn't handled </a><br />
<br />
<span style="color: #0b5394;"><b>Introduction : - </b></span><br />
<br />
In this article i am explaining how i can show GridView Paging Not Displaying Data After Switching Page. In my previous article i have explained <a href="http://dotnetnukes.blogspot.in/2013/05/javascript-validation-for-gridview-in.html" target="_blank">Java script for gridview in edit mode</a> , <a href="http://dotnetnukes.blogspot.in/2013/05/gridview-rowcommand-object-reference.html" target="_blank">Gridview rowcommand object reference not set to an instance of object </a><br />
<br />
<span style="color: #0b5394;"><b>Description : -</b></span><br />
<br />
I am having a bit of trouble with Paging within a GridView grid I have set up. I have added the paging but whenever I click on the next page or the last page buttons, the page refreshes and displays blank<br />
So Bind the Gridview as show below <br />
<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)<br /> {<br /> GridView1.PageIndex = e.NewPageIndex;<br /> BingGridViewData();<span style="font-family: "Cambria","serif"; mso-ascii-theme-font: major-latin; mso-bidi-font-family: Consolas; mso-hansi-theme-font: major-latin;"><span style="color: green;">//Call bind gridview function</span></span><br /> }</div>
<br />
<br />
Create a new asp.net web site and add new page . Darg and drop gridview on page . and write this function on code behind of asp.net web page as shown below<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
protected void BingGridViewData()<br /> {<br /> _objcon = DonetionConnectionDB.GetConnection();<br /> DataTable dt = new DataTable();<br /> string query = "SELECT * FROM causes_tab order by ID DESC";<br /> MySqlDataAdapter _objda = new MySqlDataAdapter(query, _objcon);<br /> _objda.SelectCommand.CommandType = CommandType.Text;<br /> <br /> _objda.Fill(dt);<br /> GridView1.DataSource = dt;<br /> GridView1.DataBind();<br /> _objcon.Close();<br /> }</div>
<br />
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-76062169688714926132013-08-09T07:32:00.001-07:002013-08-09T09:07:39.862-07:00The gridview 'gridview1' fired event pageindexchanging which wasn't handled. c#<div dir="ltr" style="text-align: left;" trbidi="on">
<title>The gridview 'gridview1' fired event pageindexchanging which wasn't handled. Solution</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
a { text-decoration: none;color:green;}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Categories :-</b></span> <a href="http://dotnetnukes.blogspot.in/2013/05/javascript-validation-for-gridview-in.html" target="_blank">Java script validation for Grid View in edit mode</a> , <a href="http://dotnetnukes.blogspot.in/2013/05/javascript-validation-for-gridview.html" target="_blank">Javascript validation for Gridview footer textbox</a> , <a href="http://dotnetnukes.blogspot.in/2013/05/gridview-rowcommand-object-reference.html" target="_blank">Gridview RowCommand object reference not set to an instance of an object</a> , <a href="http://dotnetnukes.blogspot.in/2013/04/onclick-checkbox-select-data-from.html" target="_blank">onclick checkbox select data from gridview asp.net </a><br />
<br />
<b><span style="color: #0b5394;">Introduction :-</span></b><br />
<br />
In my previous article I have explained <a href="http://dotnetnukes.blogspot.in/2013/05/gridview-rowcommand-object-reference.html" target="_blank">Gridview rowcommand object reference not set to an instance of object</a>. Now i have face this problem when i change the gridview <span style="color: red;">AllowPaging</span>=<span style="color: #0b5394;">"True"</span> <span style="color: red;">PageSize</span>=<span style="color: #0b5394;">"1"</span> .The Error message as shown below<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3PcbnMckv2Vgd-lBuUZ8iVzVGWntlG9zuL1p_m12yGj7OmVYbwyFvO6IF4I4uJGCd9fW1Hmf796KEmnubxD6A2vTwK72Uf96KxNpb3dEew6h3qFsrzCrjzjQc7RRA90dK31OR02DXIBzj/s1600/Pagingerrorinasp.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="86" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3PcbnMckv2Vgd-lBuUZ8iVzVGWntlG9zuL1p_m12yGj7OmVYbwyFvO6IF4I4uJGCd9fW1Hmf796KEmnubxD6A2vTwK72Uf96KxNpb3dEew6h3qFsrzCrjzjQc7RRA90dK31OR02DXIBzj/s400/Pagingerrorinasp.png" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<span style="color: #0b5394;"><b>Description : -</b></span><br />
<br />
Now i have a solution for this problem .<br />
Select the Gridviw and click on PageIndexChanging Event of the Gridview and write a one line code as shown below<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)<br />
{<br />
GridView1.PageIndex = e.NewPageIndex;<br />
BingGridViewData();// GridView Paging Not Displaying Data After Switching Page<br />
}</div>
<br /></div>
<div id="font">
Fired this event on code behind of the page and error is solved <br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com1tag:blogger.com,1999:blog-1635329706563504993.post-37001536201015558962013-08-03T12:20:00.002-07:002013-08-03T20:05:50.024-07:00Regular expression validator for image file extension<div dir="ltr" style="text-align: left;" trbidi="on">
<title>Regular expression image file extension</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<br />
<div id="font">
<span style="color: #0b5394;"><b>Introduction :- </b></span><br />
In this article i have explained how to validate image using Regular Expression Validator in <a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" style="text-decoration: underline;" target="_blank"><span style="color: green;">asp.net</span></a> before upload in data base or image fonder.In my previous article i have explained Different Validation Control in asp.net Like this :- <a href="http://www.dotnetnukes.blogspot.in/2013/07/how-to-allow-only-numeric-values-into.html" style="text-decoration: underline;" target="_blank"><span style="color: green;">How to allow numeric values into textbox</span></a> , <a href="http://www.dotnetnukes.blogspot.in/2013/07/how-to-upload-multiple-photos-using.html" target="_blank">
<span style="color: green; text-decoration: underline;">How to upload multiple photo using asp.net</span></a> , <a href="http://www.dotnetnukes.blogspot.in/2013/03/aspnet-controls-with-example.html" style="text-decoration: underline;" target="_blank"><span style="color: green;">Asp.net Control With Example</span></a> , <a href="http://www.dotnetnukes.blogspot.in/2013/04/jquery-form-validation-in-aspnet.html" target="_blank"><span style="color: green;">Jquery form validation in asp.net</span></a> , <a href="http://www.dotnetnukes.blogspot.in/2013/05/javascript-validation-for-gridview.html" style="text-decoration: underline;" target="_blank"><span style="color: green;">JavaScript validation for grid view footer textbox</span></a> , <a href="http://www.dotnetnukes.blogspot.in/2013/05/javascript-validation-for-gridview-in.html" style="text-decoration: underline;" target="_blank">
<span style="color: green;">JavaScript validation for grid view in edit mode</span></a><br />
<br />
<span style="color: #0b5394;"><b>Description :- </b></span><br />
<br />
In this Post I have created a new project and add use a Regular Expression Validator in asp.net as show below<br />
<br />step 1 - Create a new project .<br />
Step 2 - Write Click on project explorer and add a new form .<br />
Step 3 - Drag and drop a RegularExpressionValidator and file upload control on the page.<br />
Step 4 - Drap and drop a button on the web page for save the image on click button in the image folder. <br />
Step 5- Write Click and add new folder in your project. <br />
<br />
Now set the property for validate the image using RegularExpressionValidator as show below<br />
<br />
Control to validate =FileUploade<br />
Text = Invalid image icon<br />
ValidationExperssion =^.*\.((j|J)(p|P)(e|E)?(g|G)|(g|G)(i|I)(f|F)|(p|P)(n|N)(g|G))$"<br />
<br />
Complete Code as show below<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<head runat="server"><br />
<title></title><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<br />
<asp:FileUpload ID="File1" runat="server" /><br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Upload" /><br />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" <br />
ControlToValidate="File1" ForeColor="Red" <br />
ValidationExpression="^.*\.((j|J)(p|P)(e|E)?(g|G)|(g|G)(i|I)(f|F)|(p|P)(n|N)(g|G))$">Invalide file !</asp:RegularExpressionValidator><br />
<br />
</div><br />
</form><br />
</body><br />
</html></div>
<br />
<br />
Output image as show below<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaYX1Sf6nub9ssLfEsYhShTqKoY0Y_cAOw0BzjI8yrjbRUYvPsptkA0hhyphenhyphenb-lo9JzS7DTsC4TqboGQ0yuMOqngldPyEqA6F93G896jPzq2c38_Ej5UGW-PWa4NfiaHwSTz80rhHR10kKhI/s1600/fileimag.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaYX1Sf6nub9ssLfEsYhShTqKoY0Y_cAOw0BzjI8yrjbRUYvPsptkA0hhyphenhyphenb-lo9JzS7DTsC4TqboGQ0yuMOqngldPyEqA6F93G896jPzq2c38_Ej5UGW-PWa4NfiaHwSTz80rhHR10kKhI/s1600/fileimag.PNG" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 10pt;"><span class="IL_AD" id="IL_AD4">Download sample</span> code attached</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://app.box.com/s/3kih1dnyu1ie2vj95p8l" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhojxuRX3ah_hLDDYYKBfuePKekozECe2WiRkvWI90CuyTQbZnnmH9gC4IdXGhguF70Qc7a1ExOz4EP9blbOA9SQLMdw82Y6Iuzb-p-HIk6o3gQ9p4VBzsfQlyCUebKrGZB7UH7gUh5n2_i/s1600/Download.png" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com1tag:blogger.com,1999:blog-1635329706563504993.post-20657537350109733392013-07-29T11:30:00.000-07:002013-08-03T08:46:35.698-07:00Latest asp.net interview questions and answers for experienced<div dir="ltr" style="text-align: left;" trbidi="on">
<title>Latest asp.net interview questions and answers for experienced</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Introduction : -</b></span><br />
<br />
<span style="color: #0b5394;"><span style="color: black;">I have Collection new <a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" target="_blank"><span style="color: green;">asp.net</span></a> <a href="http://dotnetnukes.blogspot.in/2013/02/interview-questions-and-answers-for-1.html" target="_blank"><span style="color: green;">interview question and answer for experience and fresher</span></a> .This is very important asp.net interview question with answer.</span></span><br />
<span style="color: #0b5394;"><span style="color: black;">Every interviewer firstly ask </span></span><br />
<br />
<span style="color: #0b5394;"><span style="color: black;">1 .<b><span style="color: #0b5394;"> Tell me about Your Self ?</span></b></span></span><br />
<br />
<span style="color: #0b5394;"><span style="color: black;"><span style="color: #0b5394;">Ans</span> </span></span><span style="color: #0b5394;"><span style="color: black;">Good morning sir/madam.This is Chitranjan Singh Rathore My educational qualification are:
I have completed my 10th standard in 2002 from Little flower school and also 12th standard in 2004.
I have completed my graduation in 2007 from Holkar science college.
I have completed my post graduation in 2010 from Medicaps Colloege indore .</span></span><br />
<span style="color: #0b5394;"><span style="color: black;">For More <a href="http://dotnetnukes.blogspot.in/2013/04/latest-interview-questions-on-asp-net-c.html" target="_blank"><span style="color: green;">Click Here</span></a><br />
</span></span><br />
<span style="color: #0b5394;"><span style="color: black;"> </span><b> </b></span><br />
2 . <span style="color: #0b5394;"><b>What is asp.net ?</b></span><br />
<br />
<span style="color: #0b5394;">Ans</span> Dot Net is a Framework technology, that means which is integrated with
multiple technologies like windows, web, web services, etc.It is Use to develop web based, windows based application.<br />
For More <a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" target="_blank"><span style="color: green;">Click Here</span></a><br />
<br />
3. <span style="color: #0b5394;"><b>Difference Between Form authentication and windows authentication ?</b></span><br />
<br />
For Get the answer- <a href="http://dotnetnukes.blogspot.in/2013/04/difference-between-form-authentication.html" target="_blank"><span style="color: green;">Form authentication and windows authentication</span> </a></div>
<br />
4 . <span style="color: #0b5394;"><b>What is authentication and authorization in asp.net ?</b></span><br />
<br />
<span style="color: #0b5394;">Answer</span> . This is very important question .every technical interview round ask this question<br />
<a href="http://dotnetnukes.blogspot.in/2013/04/what-is-authentication-and.html" target="_blank"><span style="color: green;">authentication and authorization in asp.net</span></a><br />
<br />
5. <span style="color: #0b5394;"><b>What is web form ,windows form and client server architecture ?</b></span><br />
<br />
<span style="color: #0b5394;">Ans</span> - This is very important and interesting question.Now we will talk about(web form and windows form)<br />
<br />
<span style="color: #0b5394;">Web from :-</span><br />
<br />
1 ) As we know web from use browser presentation(asp.net form has no exception )<br />
2 ) ASP.NET Form inherits Page class (contained in System.Web.UI namespace).<br />
3 ) Web Forms to create Web-based applications that display in a Web browser.<br />
4 ) Webapplications run on webservers (usually IIS)<br />
<br />
<span style="color: #0b5394;">Windows From : -</span><br />
<br />
1 ) Window form has own presentation .<br />
2 ) A Form of Windows Forms inherits <b>Form</b> class (contained in System.Windows.Forms namespace).<br />
3 ) Windows Forms to create rich applications that install and run locally on a machine.<br />
4 ) Windows forms are used in desktop based applications which heavily rely on the GDI.<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com1tag:blogger.com,1999:blog-1635329706563504993.post-76135704915584081752013-07-26T13:38:00.001-07:002013-08-17T08:32:51.972-07:00How to upload multiple photos using asp.net<div dir="ltr" style="text-align: left;" trbidi="on">
<title>How to upload multiple photos using asp.net</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Introduction :- </b></span><br />
<br />
In my previous article i have explain the <a href="http://dotnetnukes.blogspot.in/2013/04/ajax-asyncfileupload-control-example-in.html" target="_blank">Ajax-asyncfileupload-control-example</a> in <a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" target="_blank">asp.net</a>. Now in this article we will upload multiple image using single file upload <a href="http://dotnetnukes.blogspot.in/2013/03/aspnet-controls-with-example.html">control</a> in <a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" target="_blank">asp.net</a>.<br />
<br />
<span style="color: #0b5394;"><b>Description :- </b></span><br />
<br />
In this Article we take on file upload control and on button on <a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" target="_blank">asp.net</a> web from.This is very important article for upload multiple image in database and folder .now we upload the multiple images in a folder some easy process<br />
<br />
<span style="color: #073763;"><span style="background-color: white;"><span style="color: #0b5394;">Step 1</span> -</span></span> Create a asp.net web project and add new from like this<br />
Open visual stdio go to File->new ->Project and write the name of the project<br />
<br />
<span style="color: #0b5394;">Step 2 -</span> Write click on solution explorer and add new item ->select new web form->write the name of form<br />
<br />
<span style="color: #0b5394;">step 3 -</span> Drag and drop the file upload control on the form<br />
<span style="color: #0b5394;">Step 4 -</span> Drag and drop the asp.net Button on the form<br />
<span style="color: #0b5394;">Step 5 -</span> Drag and drop one label on the form for count how many image you have select <br />
<span style="color: #0b5394;">Step 6 - </span>Write click on Project (Solution Explorer) and add new folder and give the name to the folder is image<br />
<br />
Note -: Write <span style="color: #0b5394;"><b>multiple="true"</b></span> for select multiple file or image using file upload control of <a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" target="_blank">asp.net</a><br />
Note - use this namespace <span style="color: #0b5394;">using System.IO;</span><br />
<br />
Complete Source Code as shown below<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<asp:FileUpload runat="server" ID="UploadImages" multiple="true"/><br />
<asp:Button runat="server" ID="uploadedFile" Text="Upload" OnClick="uploadFile_Click" /><br />
<asp:Label ID="listofuploadedfiles" runat="server" /><br />
<br />
<span style="color: #990000;"></span></div>
<br />
<br />
double Click on asp.net button control or write click on from and select View Code .Go to code Behind File and write a code for upload a images in folder.<br />
<br />
Code as shown below<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
HttpFileCollection fileCollection = Request.Files;<br />
for (int i = 0; i < fileCollection.Count; i++)<br />
{<br />
HttpPostedFile uploadfile = fileCollection[i];<br />
string fileName = Path.GetFileName(uploadfile.FileName);<br />
if (uploadfile.ContentLength > 0)<br />
{<br />
uploadfile.SaveAs(Server.MapPath("~/image/slider/") + fileName);<br />
<br />
listofuploadedfiles.Text += String.Format("{0}<br />",uploadfile.FileName);<br />
}<br />
}<br />
<span style="color: #990000;"></span></div>
<br />
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com1tag:blogger.com,1999:blog-1635329706563504993.post-29829276003897862992013-07-23T00:42:00.002-07:002013-07-23T00:42:31.941-07:00How to allow only Numeric values into a textbox<div dir="ltr" style="text-align: left;" trbidi="on">
<title>How to allow only Numeric values into a textbox </title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Introduction :-</b></span><br />
<br />
In my previous article i have explained how i can use <a href="http://dotnetnukes.blogspot.in/2013/03/aspnet-controls-with-example.html" target="_blank"><span style="color: green;">validation control</span></a> in<a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" target="_blank"><span style="color: green;"> asp.net</span></a>.In this article I am explain how i can allow online integer values for text box using regular expression in asp.net.<br />
<br />
<span style="color: #0b5394;"><b>Description : -</b></span><br />
In my Previous article i have explained how to <a href="http://dotnetnukes.blogspot.in/2013/04/jquery-form-validation-in-aspnet.html" target="_blank"><span style="color: green;">validated form using jquery in asp.net</span></a>.And i have Provided Full Description with example for each and every control in <a href="http://dotnetnukes.blogspot.in/2013/02/aspnet.html" target="_blank"><span style="color: green;">asp.net</span></a>. Name of Controls are<br />
<br />
<a href="http://dotnetnukes.blogspot.in/2013/03/validation-controls-using-aspnet.html" target="_blank"><span style="color: green;">RequiredFieldValidation</span></a>,<a href="http://dotnetnukes.blogspot.in/2013/03/validation-controls-using-aspnet.html" target="_blank"><span style="color: green;">RangeValidator</span></a>,<a href="http://dotnetnukes.blogspot.in/2013/03/validation-controls-using-aspnet.html" target="_blank"><span style="color: green;">RegularExpressionValidator</span></a>,<a href="http://dotnetnukes.blogspot.in/2013/03/validation-controls-using-aspnet.html" target="_blank"><span style="color: green;">CompareValidator</span>,</a><a href="http://dotnetnukes.blogspot.in/2013/03/validation-controls-using-aspnet.html" target="_blank"><span style="color: green;">CustomValidator</span>,</a><br />
<a href="http://dotnetnukes.blogspot.in/2013/03/validation-controls-using-aspnet.html" target="_blank"><span style="color: green;">CustomValidator</span></a><br />
<br />
In this article i have explain how to validate textbox using regular expression allow only integer values<br />
<br />
Process :-<br />
1 : - Create a new project in asp.net and add new from and drag and drop a text box and provide the id to the textbox.In this article the id of text box is <span style="color: #0b5394;">txt_priority </span>.<br />
2 : - Drag and drop the Regular Expression validator on the form and set the property as show below<br />
ID =RegularExpressionValidator1<br />
ControtoValidate= <span style="color: #0b5394;">txt_priority </span>[this is textbox id]<br />
ErrorMessage=Please enter numbers only<br />
ForColor=Red<br />
ValidationExpression=\d+<br />
<br />
<b><span style="color: #0b5394;">complete example as show below</span></b><br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<asp:RegularExpressionValidator id="RegularExpressionValidator1"<br />
ControlToValidate="txt_priority"<br />
ValidationExpression="\d+"<br />
Display="Static"<br />
EnableClientScript="true"<br />
ErrorMessage="Please enter numbers only"<br />
runat="server" ForeColor="Red"/><span style="color: #990000;"></span></div>
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com0tag:blogger.com,1999:blog-1635329706563504993.post-33092363467328495282013-07-17T03:12:00.001-07:002013-07-17T04:00:16.376-07:00How to call asp.net web service from android application<div dir="ltr" style="text-align: left;" trbidi="on">
<title>create simple drop down menu using jquery </title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b>Introduction : -</b></span><br />
<br />
In this article i am explaining how to call the asp.net asmx web service .This is very nice article for call the asmx web service for android application.<br />
Setp 1 -> Open visual studio and create a new project like this<br />
<br />
File->new->Project<br />
And write the name of project and click ok<br />
<br />
Step 2 -> Write click on project add ->add new item<br />
select web service and click ok and write the code as shown below on our webservice.asmx<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Web;<br />
using System.Web.Services;<br />
<br />
<br />
[WebService(Namespace = "http://tempuri.org/")]<br />
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
<br />
public class WebService : System.Web.Services.WebService {<br />
<br />
public WebService () {<br />
<br />
//Uncomment the following line if using designed components <br />
//InitializeComponent(); <br />
}<br />
<br />
<br />
<br />
<span style="color: #cc0000;"> [WebMethod]<br /> public int Add(int a, int b)<br /> {<br /> return a + b;<br /> } </span><br />
<br />
<br />
}<br />
<span style="color: #990000;"></span></div>
<br />
Step 3 -> Run our web service and check the output is proper or not like this<br />
Click on Add <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQKT-yOXzcfhRg-0XkC-fbtEvWl46oXFDwo0h_uQCxO7aD5rQMU7XzNif66mDgoz5K0glRDVRFQn7Hp_BiDEW8ydofM5aM7Yv0_HnmW7xPFY_q-KFDnzcYr5iO800k7xtRgSWJicQ9Uzrs/s1600/android1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQKT-yOXzcfhRg-0XkC-fbtEvWl46oXFDwo0h_uQCxO7aD5rQMU7XzNif66mDgoz5K0glRDVRFQn7Hp_BiDEW8ydofM5aM7Yv0_HnmW7xPFY_q-KFDnzcYr5iO800k7xtRgSWJicQ9Uzrs/s1600/android1.PNG" /></a></div>
<br />
Enter Values a=10 and b=10<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis5qTCam_vaCHo6EA4e7ShbWed2atTGPgf5o_mcJf_fgrqz7Y_JtrDhUP19xQI3G4Iy42Q5PAIlK0Dz2cwp0SUImDcfIhtdMhp7HADZ-ggFhjqOQStn0Pbrxuoiflb0bnWT1uEvfQ0cN5F/s1600/android2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis5qTCam_vaCHo6EA4e7ShbWed2atTGPgf5o_mcJf_fgrqz7Y_JtrDhUP19xQI3G4Iy42Q5PAIlK0Dz2cwp0SUImDcfIhtdMhp7HADZ-ggFhjqOQStn0Pbrxuoiflb0bnWT1uEvfQ0cN5F/s1600/android2.PNG" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
Then Click on Invoke and output as shown below</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxUH5KNynX8-jcEo-vYCz8EV1Kty3IseIdfGqy8wtJLHdvxxrc7oHtKBkjFHD0C4vp00vxQKRVEc_lcMtgRgWKoo9fKKAlt9NLd2UK9uoPU5J_Q9TI5wKmulHz6C2f9pvDoGuRPJBqgo1J/s1600/android3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxUH5KNynX8-jcEo-vYCz8EV1Kty3IseIdfGqy8wtJLHdvxxrc7oHtKBkjFHD0C4vp00vxQKRVEc_lcMtgRgWKoo9fKKAlt9NLd2UK9uoPU5J_Q9TI5wKmulHz6C2f9pvDoGuRPJBqgo1J/s1600/android3.PNG" /></a></div>
<br />
<span style="color: #0b5394;"><b>Start Android Applcation : -</b></span><br />
<span style="color: #0b5394;"><b><br /></b></span>
step 1 -> Doble Click on eclipse IDE and in front of you appear the GUI .<br />
step 2 -> select File->new->Android Application Project<br />
and fill all the filed as show in image<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSOdyIM63UGmsuvwx6DaOF_rZs2Gc0oFi-hBAp05NO9ys_6Cug80GfCx30DmupY6MdupHLnMEKOEQcnNfBNa8x1Vg1DqyDSrJ-FZlQFTiZBBa242DMiOvgci-5OGbd2un0fireCenaHhWF/s1600/android_pro.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSOdyIM63UGmsuvwx6DaOF_rZs2Gc0oFi-hBAp05NO9ys_6Cug80GfCx30DmupY6MdupHLnMEKOEQcnNfBNa8x1Vg1DqyDSrJ-FZlQFTiZBBa242DMiOvgci-5OGbd2un0fireCenaHhWF/s1600/android_pro.PNG" /></a></div>
<br />
step 3-> Click Next->Next->Next->Next->Finish<br />
Step 4-> On Android Application is Created <br />
<br />
Step4->Download the jar file<br />
<a href="https://app.box.com/s/urrkeyo0hgn8hw3xy5dk" target="_blank">ksoap2-android-assembly-2.5.5-jar-with-dependencies.jar </a><br />
<br />
Step 5 -> Copy and past in libs folder and write click->Build Path->Configration Build Path<br />
<br />
Note - If libs folder not avable in our project then create new folder name like libs and keep this jar file<br />
<br />
step 6 -> Now Write Click on Project Add->New->Class [class name like<span style="color: #0b5394;"><b> CallSoap.java</b></span>]<br />
<br />
And Write the Code as Shown Below <br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
import org.ksoap2.SoapEnvelope; <br />
import org.ksoap2.serialization.PropertyInfo; <br />
import org.ksoap2.serialization.SoapObject;<br />
import org.ksoap2.serialization.SoapSerializationEnvelope;<br />
import org.ksoap2.transport.HttpTransportSE;<br />
public class CallSoap {<br />
public final String SOAP_ACTION = "http://tempuri.org/Add";<br />
<br />
public final String OPERATION_NAME = "Add"; <br />
<br />
public final String WSDL_TARGET_NAMESPACE = "http://tempuri.org/";<br />
<br />
public final String SOAP_ADDRESS = "http://179.45.33.245/webservice/WebService.asmx";<br />
public CallSoap() <br />
{ <br />
}<br />
public String Call(int a,int b)<br />
{<br />
SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,OPERATION_NAME);<br />
PropertyInfo pi=new PropertyInfo();<br />
pi.setName("a");<br />
pi.setValue(a);<br />
pi.setType(Integer.class);<br />
request.addProperty(pi);<br />
pi=new PropertyInfo();<br />
pi.setName("b");<br />
pi.setValue(b);<br />
pi.setType(Integer.class);<br />
request.addProperty(pi);<br />
<br />
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(<br />
SoapEnvelope.VER11);<br />
envelope.dotNet = true;<br />
<br />
envelope.setOutputSoapObject(request);<br />
<br />
HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);<br />
Object response=null;<br />
try<br />
{<br />
httpTransport.call(SOAP_ACTION, envelope);<br />
response = envelope.getResponse();<br />
}<br />
catch (Exception exception)<br />
{<br />
response=exception.toString();<br />
}<br />
return response.toString();<br />
}<br />
}<br />
<span style="color: #990000;"></span></div>
<br /></div>
<div id="font">
step 7 -> open activity_main.xml and copy and past the code<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<?xml version="1.0" encoding="utf-8"?><br />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"<br />
android:layout_width="fill_parent"<br />
android:layout_height="fill_parent"<br />
android:orientation="vertical" ><br />
<br />
<TextView<br />
android:layout_width="fill_parent"<br />
android:layout_height="wrap_content"<br />
android:text="hello" /><br />
<br />
<EditText<br />
android:id="@+id/editText1"<br />
android:layout_width="230dp"<br />
android:layout_height="wrap_content" ><br />
<br />
<requestFocus /><br />
</EditText><br />
<br />
<EditText<br />
android:id="@+id/editText2"<br />
android:layout_width="232dp"<br />
android:layout_height="wrap_content" /><br />
<br />
<br />
<br />
<br />
<br />
<Button<br />
android:id="@+id/button1"<br />
android:layout_width="229dp"<br />
android:layout_height="wrap_content"<br />
android:text="submit" /><br />
<br />
<br />
<br />
</LinearLayout><span style="color: #990000;"></span></div>
</div>
<div id="font">
Step 8 -> Open the MainActivity.java<br />
<br />
And write the code as shown below</div>
<div id="font">
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
import android.R.string;<br />
import android.os.Bundle;<br />
import android.os.StrictMode;<br />
import android.app.Activity;<br />
import android.app.AlertDialog;<br />
import android.view.Menu;<br />
import android.view.View;<br />
import android.view.View.OnClickListener;<br />
import android.widget.Button;<br />
import android.widget.EditText;<br />
import android.widget.TextView;<br />
<br />
public class MainActivity extends Activity {<br />
<br />
private TextView textDisplay;<br />
<br />
@Override<br />
public void onCreate(Bundle savedInstanceState) {<br />
super.onCreate(savedInstanceState);<br />
if (android.os.Build.VERSION.SDK_INT > 9) {<br />
StrictMode.ThreadPolicy policy = <br />
new StrictMode.ThreadPolicy.Builder().permitAll().build();<br />
StrictMode.setThreadPolicy(policy);<br />
}<br />
setContentView(R.layout.activity_main);<br />
Button b1=(Button)findViewById(R.id.button1);<br />
//textDisplay =(TextView)findViewById(R.id.text);<br />
//textDisplay.setText("heloo");<br />
final AlertDialog ad=new AlertDialog.Builder(this).create();<br />
<br />
b1.setOnClickListener(new OnClickListener() { <br />
@Override<br />
public void onClick(View arg0) {<br />
// TODO Auto-generated method stub<br />
CallSoap cs=new CallSoap();<br />
//soapshowrecord showrec=new soapshowrecord(); <br />
try<br />
{<br />
EditText ed1=(EditText)findViewById(R.id.editText1);<br />
EditText ed2=(EditText)findViewById(R.id.editText2);<br />
int a=Integer.parseInt(ed1.getText().toString());<br />
int b=Integer.parseInt(ed2.getText().toString());<br />
//EditText ed3=(EditText)findViewById(R.id.text);<br />
//String record=(ed3.getText().toString());<br />
ad.setTitle("OUTPUT OF ADD of "+a+" and "+b);<br />
<br />
//String resp1=showrec.Call1(record);<br />
//record=resp1;<br />
<br />
String resp=cs.Call(a, b);<br />
ad.setMessage(resp);<br />
}catch(Exception ex)<br />
{<br />
ad.setTitle("Error!");<br />
ad.setMessage(ex.toString());<br />
}<br />
ad.show(); }<br />
});<br />
}<br />
<br />
}<br />
<span style="color: #990000;"></span></div>
</div>
<br />
Output as shown Below<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaV0Yq-uvNpUMz-S0MhOi7Wvhb62UzVuQM8eXp0G4pPE9IPhbnI4Wz8k3XWMUr8W4yewgw-ttkpPokwZ5rO1dmpGYJWykkULcalpRVBGIDqsPWuBOkYuyyGWXS6eNcefPCuogyLiV-VD_P/s1600/android_pro1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaV0Yq-uvNpUMz-S0MhOi7Wvhb62UzVuQM8eXp0G4pPE9IPhbnI4Wz8k3XWMUr8W4yewgw-ttkpPokwZ5rO1dmpGYJWykkULcalpRVBGIDqsPWuBOkYuyyGWXS6eNcefPCuogyLiV-VD_P/s1600/android_pro1.PNG" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA0PJwXkB7cEHcDYUCGB1TaDn41XjWzVnFfLK56EP5UOL6sQktIqENlieV5wY_EJ7gWKIO2KwYFzrhdfXnFpGYJWsMHmSNlcH5RUrnLu47W9mU3yqfqogoPZqUZYppc539gEB_sfmAurrZ/s1600/android_pro2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA0PJwXkB7cEHcDYUCGB1TaDn41XjWzVnFfLK56EP5UOL6sQktIqENlieV5wY_EJ7gWKIO2KwYFzrhdfXnFpGYJWsMHmSNlcH5RUrnLu47W9mU3yqfqogoPZqUZYppc539gEB_sfmAurrZ/s1600/android_pro2.PNG" /></a></div>
<br />
<br />
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com1tag:blogger.com,1999:blog-1635329706563504993.post-91283247833983469682013-07-16T05:00:00.004-07:002013-07-16T05:09:05.455-07:00Image slider in asp.net using jquery<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<title>create simple drop down menu using jquery </title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b> Categories :- </b><a href="http://dotnetnukes.blogspot.in/2013/07/image-slider-in-asp-net.html" target="_blank"><span style="color: black;"><span style="color: green;">Image Slider In asp.net with example</span></span></a></span><br />
<br />
<span style="color: #0b5394;"><b>Introduction : -</b></span><br />
<br />
This is very easy to implement the slider in asp.net .In my previous article i have explained very nice example for <a href="http://dotnetnukes.blogspot.in/2013/07/image-slider-in-asp-net.html" target="_blank"><span style="color: green;">implement the slider in asp.net.</span></a></div>
</div>
<div id="font">
This is very simple and easy to use slider in our web page. in this post you can adjust the width and height as well as time delay of image <br />
<br />
In this article you have to include a one .js file like this<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<script type="text/javascript" src="Scripts/jquery-1.4.1.js"></script><span style="color: #990000;"></span></div>
<br />
Jquey Function is like this<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<script type="text/javascript"><br />
$(document).ready(function () {<br />
<br />
var currentPosition = 0;<br />
var slideWidth = 600;<br />
var slides = $('.slide');<br />
var numberOfSlides = slides.length;<br />
var slideShowInterval;<br />
var speed = 2000;<br />
<br />
<br />
slideShowInterval = setInterval(changePosition, speed);<br />
<br />
slides.wrapAll('<div id="slidesHolder"></div>')<br />
<br />
slides.css({ 'float': 'left' });<br />
<br />
$('#slidesHolder').css('width', slideWidth * numberOfSlides);<br />
<br />
<br />
function changePosition() {<br />
if (currentPosition == numberOfSlides - 1) {<br />
currentPosition = 0;<br />
} else {<br />
currentPosition++;<br />
}<br />
moveSlide();<br />
}<br />
<br />
<br />
function moveSlide() {<br />
$('#slidesHolder')<br />
.animate({ 'marginLeft': slideWidth * (-currentPosition) });<br />
}<br />
<br />
});<br />
<br />
</script><span style="color: #990000;"></span></div>
<br />
Complete Source As shown below<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head id="Head1" runat="server"><br />
<title></title><br />
<script type="text/javascript" src="Scripts/jquery-1.4.1.js"></script><br />
<style type="text/css"><br />
#slideshow #slideshowWindow <br />
{<br />
<br />
width:512px;<br />
height:200px;<br />
margin:0;<br />
padding:0;<br />
position:relative;<br />
overflow:hidden;<br />
}<br />
<br />
#slideshow #slideshowWindow .slide {<br />
margin:0;<br />
padding:0;<br />
width:512px;<br />
height:384px;<br />
float:left;<br />
position:relative;<br />
}<br />
</style><br />
<br />
<script type="text/javascript"><br />
$(document).ready(function () {<br />
<br />
var currentPosition = 0;<br />
var slideWidth = 600;<br />
var slides = $('.slide');<br />
var numberOfSlides = slides.length;<br />
var slideShowInterval;<br />
var speed = 2000;<br />
<br />
<br />
slideShowInterval = setInterval(changePosition, speed);<br />
<br />
slides.wrapAll('<div id="slidesHolder"></div>')<br />
<br />
slides.css({ 'float': 'left' });<br />
<br />
$('#slidesHolder').css('width', slideWidth * numberOfSlides);<br />
<br />
<br />
function changePosition() {<br />
if (currentPosition == numberOfSlides - 1) {<br />
currentPosition = 0;<br />
} else {<br />
currentPosition++;<br />
}<br />
moveSlide();<br />
}<br />
<br />
<br />
function moveSlide() {<br />
$('#slidesHolder')<br />
.animate({ 'marginLeft': slideWidth * (-currentPosition) });<br />
}<br />
<br />
});<br />
<br />
</script><br />
<br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<center><br />
<div id="slideshow"><br />
<div id="slideshowWindow"><br />
<br />
<div class="slide"><br />
<img src="img/1.jpg" alt="http://dotnetnukes.blogspot.in"/><br />
</div><!--/slide--><br />
<br />
<div class="slide"><br />
<img src="img/2.jpg" alt="http://dotnetnukes.blogspot.in"/><br />
</div><!--/slide--><br />
<br />
<div class="slide"><br />
<img src="img/3.jpg" alt="http://dotnetnukes.blogspot.in"/><br />
</div><!--/slide--><br />
<br />
<div class="slide"><br />
<img src="img/4.jpg" alt="http://dotnetnukes.blogspot.in"/><br />
</div><br />
<br />
</div><br />
</div><br />
</center><br />
</form> <br />
<br />
</body><br />
</html><span style="color: #990000;"></span></div>
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 10pt;"><span class="IL_AD" id="IL_AD4">Download sample</span> code attached</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://app.box.com/s/n3fexmr4wxd82jtayvn7" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhojxuRX3ah_hLDDYYKBfuePKekozECe2WiRkvWI90CuyTQbZnnmH9gC4IdXGhguF70Qc7a1ExOz4EP9blbOA9SQLMdw82Y6Iuzb-p-HIk6o3gQ9p4VBzsfQlyCUebKrGZB7UH7gUh5n2_i/s1600/Download.png" /></a></div>
<br />
<br />
<br />
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com2tag:blogger.com,1999:blog-1635329706563504993.post-61603051852430482902013-07-16T04:39:00.002-07:002013-07-16T04:39:52.428-07:00Image slider in asp net <div dir="ltr" style="text-align: left;" trbidi="on">
<title>Image slider in asp net </title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><span style="background-color: white;"><b>Introduction :-</b></span> </span><br />
In this Post i am explain how i can implement the slider in asp.net.This is very easy to implement the slider in asp.net.<br />
<br />
<span style="color: #0b5394;"><b>Description : -</b></span><br />
<br />
In my previous post i have explained implement the <a href="http://dotnetnukes.blogspot.in/2013/04/create-simple-drop-down-menu-using.html" target="_blank"><span style="color: green;">drop down menu using jquery</span></a>. Here i am explain implement the j query slider in asp.net .<br />
<br />
In this Post first we include the .js and .css file in our page .Image as show below<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhueFxDjnuG9dm4XJbnT9hFP1gm9_behK5yCjTYIlTIXhFg7Fu_b74LrA6b_c3fOh1yWhC_pT4vRlsvSNKXwGWnEv4drGEN_Si5sJSpq8-9pIkWicH4jbIr56hcaN4Tlt8NYWGOwbDwbcK_/s1600/slider.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhueFxDjnuG9dm4XJbnT9hFP1gm9_behK5yCjTYIlTIXhFg7Fu_b74LrA6b_c3fOh1yWhC_pT4vRlsvSNKXwGWnEv4drGEN_Si5sJSpq8-9pIkWicH4jbIr56hcaN4Tlt8NYWGOwbDwbcK_/s1600/slider.PNG" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Inculde .js and .css on asp.net page as shown below<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<head runat="server"><br />
<title>Slider in asp.net</title><br />
<br />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><br />
<script type="text/javascript" src="Styles/coin-slider.js"></script><br />
<br />
<link rel="stylesheet" href="Styles/coin-slider-styles.css" type="text/css" /><br />
<br />
<link rel="stylesheet" href="Styles/coin-slider-styles.css" type="text/css" /><br />
</head><span style="color: #990000;"></span></div>
<br />
In This slider you can set the width and height of the slider image as shown below<br />
You can control the speed and delay of image and set width and height according to you web page this script write in <span style="color: #0b5394;">jqueryslider.js</span><span style="background-color: black;"></span> .Full Source Code You Can Download link are give below<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
$.fn.coinslider.defaults = {<br />
width: 700, // width of slider panel<br />
height: 200, // height of slider panel<br />
spw: 7, // squares per width<br />
sph: 5, // squares per height<br />
delay: 1000, // delay between images in ms<br />
sDelay: 30, // delay beetwen squares in ms<br />
opacity: 0.7, // opacity of title and navigation<br />
titleSpeed: 500, // speed of title appereance in ms<br />
effect: '', // random, swirl, rain, straight<br />
links : true, // show images as links<br />
hoverPause: true, // pause on hover<br />
prevText: 'prev',<br />
nextText: 'next',<br />
navigation: true, // show/hide prev, next and buttons<br />
showNavigationPrevNext: true,<br />
showNavigationButtons: true,<br />
navigationPrevNextAlwaysShown: false<br />
};<span style="color: #990000;"></span></div>
<br />
Complete code as shown below<br />
<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head runat="server"><br />
<title>Slider in asp.net</title><br />
<br />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><br />
<script type="text/javascript" src="Styles/coin-slider.js"></script><br />
<br />
<link rel="stylesheet" href="Styles/coin-slider-styles.css" type="text/css" /><br />
<br />
<link rel="stylesheet" href="Styles/coin-slider-styles.css" type="text/css" /><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<center><br />
<div id="games"><br />
<a href=http://dotnetnukes.blogspot.in target="_blank"><img src="img/1.jpg" alt="http://dotnetnukes.blogspot.in" /></a><br />
<a href=http://dotnetnukes.blogspot.in target="_blank"><img src="img/2.jpg"alt="http://dotnetnukes.blogspot.in" /></a><br />
<a href=http://dotnetnukes.blogspot.in target="_blank"><img src="img/3.jpg" alt="http://dotnetnukes.blogspot.in" /></a><br />
<a href=http://dotnetnukes.blogspot.in target="_blank"><img src="img/4.jpg" alt="http://dotnetnukes.blogspot.in" /></a><br />
<a href=http://dotnetnukes.blogspot.in target="_blank"><img src="img/5.jpg" alt="http://dotnetnukes.blogspot.in" /></a><br />
<a href=http://dotnetnukes.blogspot.in target="_blank"><img src="img/6.jpg" alt="http://dotnetnukes.blogspot.in" /></a><br />
<a href=http://dotnetnukes.blogspot.in target="_blank"><img src="img/7.jpg" alt="http://dotnetnukes.blogspot.in" /></a><br />
</div><br />
</center><br />
</form><br />
<br />
<script><br />
$('#games').coinslider();<br />
</script><br />
</body><br />
</html><br />
<span style="color: #990000;"></span></div>
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 10pt;"><span class="IL_AD" id="IL_AD4">Download sample</span> code attached</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://app.box.com/s/ezdweihwpjr389ojs03p" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhojxuRX3ah_hLDDYYKBfuePKekozECe2WiRkvWI90CuyTQbZnnmH9gC4IdXGhguF70Qc7a1ExOz4EP9blbOA9SQLMdw82Y6Iuzb-p-HIk6o3gQ9p4VBzsfQlyCUebKrGZB7UH7gUh5n2_i/s1600/Download.png" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com1tag:blogger.com,1999:blog-1635329706563504993.post-79814869602736005332013-07-08T06:46:00.000-07:002013-07-08T07:04:34.098-07:00Detecting mobile browsers in asp.net<div dir="ltr" style="text-align: left;" trbidi="on">
<title>Detecting mobile browsers in asp.net</title>
<style>
#font
{
letter-spacing: 0.75pt;
font-size: 12pt;
font-family: inherit;
}
</style>
<br />
<div id="font">
<span style="color: #0b5394;"><b> Introduction : -</b></span><br />
<br />
hello friend this is very good example for detect the mobile browser in asp.net .In this example you can restrict to user for use only mobile.And we also find the user agent of particular Mobile device.<br />
<br />
<br />
We use the name space as shown below for regular expression<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Data;<br />
using MySql.Data.MySqlClient;<br />
<span style="color: #990000;">using System.Text.RegularExpressions;//this is namespace for reg. exp.</span></div>
<br />
<br />
If we restrict our site for use in mobile then we use the following code as shown below<br />
<br />
<br />
<div style="background: #c3c3c3; border-radius: 8px; border: 2px solid #000000; padding: 10px 40px;">
string u = Request.ServerVariables["HTTP_USER_AGENT"];<br />
Regex b = new Regex(@"(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino", RegexOptions.IgnoreCase | RegexOptions.Multiline);<br />
Regex v = new Regex(@"1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-", RegexOptions.IgnoreCase | RegexOptions.Multiline);<br />
if ((b.IsMatch(u) || v.IsMatch(u.Substring(0, 4))))<br />
{<br />
Response.Write("Browsermsg:" + "This is Mobile Browser"); <br />
// Response.Redirect("http://dotnetnukes.blogspot.in//mobile");<br />
}<br />
<br />
else<br />
{<br />
Response.Write("Browsermsg:" + "This is not Mobile Browser");<br />
// Response.Redirect("http://dotnetnukes.blogspot.in//Wbsite");<br />
}<span style="color: #990000;"></span></div>
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: blue; font-family: "Verdana","sans-serif"; font-size: 10pt;"><span class="IL_AD" id="IL_AD4">Download sample</span> code attached</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://www.box.com/s/jxkty6s8c14osd2iz4k2" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhojxuRX3ah_hLDDYYKBfuePKekozECe2WiRkvWI90CuyTQbZnnmH9gC4IdXGhguF70Qc7a1ExOz4EP9blbOA9SQLMdw82Y6Iuzb-p-HIk6o3gQ9p4VBzsfQlyCUebKrGZB7UH7gUh5n2_i/s1600/Download.png" /></a></div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/10662880808042561082noreply@blogger.com2