Monday 26 December 2011

What Is A Assembly?


What Is A Assembly

1. Assembly is a unit of deployment like EXE or a DLL.
2. An Assembly consists of one or more files(dlls,exe's) and represents a group of resources,

Software Development Life Cycle(SWDLC)



Software Development Life Cycle(SWDLC)

Introduction : -

 A software Development life cycle (SWDLC) is an abstract representation of gradual development and evolution of the software the undergoes a series of sequential or concurrent step of the software development process. Each of these steps in the development of a software product which may be either a minor oe major component of the software system in contribution to the completion of the system.

Sunday 13 November 2011

Custom Exception

The Microsoft .NET team has done a good job by providing us a rich set of Exception classes. Most of the time, these exception classes are sufficient enough to handle any common error situation. However, it may be required that our application would need some additional exception classes, that are not available in .NET Framework.

Friday 11 November 2011

State Management

What is ViewState?

ViewState allows the state of objects (serializable) to be stored in a hidden field on the page.  ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.  ViewState is used the retain the state of server-side objects between postabacks.

Tuesday 8 November 2011

excel to sql


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %>

Friday 4 November 2011

jquery



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

HTML 5



<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Untitled Page</title>
    <script type="text/javascript" language="javascript" >
    if (localStorage.pagecount)
 {
 localStorage.pagecount=Number(localStorage.pagecount) +1;
 }
else
 {
 localStorage.pagecount=1;
 }
document .write ("Visits: " + localStorage.pagecount + " time(s).");
if (sessionStorage.pagecount)
 {
 sessionStorage.pagecount=Number(sessionStorage.pagecount) +1;
 }
else
 {
 sessionStorage.pagecount=1;
 }
document .write ("Visits " + sessionStorage.pagecount + " time(s) this session.");
    </script>
</head>
<body>
<form action=''>
<video width="320" height="240" controls="controls">
  <source src="http://www.w3schools.com/html5/movie.mp4" type="video/mp4" />
  <source src="movie.ogg" type="video/ogg" />
  Your browser does not support the video tag.
</video>
<div id="support1"></div>
<div id ="support"></div>
Name: <input type="text" name="usr_name" required="required" /><br />
Image :<input type="image" src="/images/logo.png" width="40" height="40" /><br />
E-mail: <input type="email" name="user_email" /><br />
URL   : <input type ="url" name ="user_url" /><br />
number: <input type ="number" min="1" max="10" /><br />
Range :<input type="range" name="points" min="1" max="10" /><br />
Date  : <input type="date" name="user_date" /><br />
Color : <input type="color" name="user_color" /><br />
Select images: <input type="file" name="img" multiple="multiple" /></br/>
Points: <input type="number" name="points" min="0" max="10" step="3" /><br />
Country code: <input type="text" name="country_code"
pattern="[A-z]{3}" title="Three letter country code" />
Webpage: <input type="url" list="url_list" name="link" />
<datalist id="url_list">
<option label="160by2" value="http://www.160by2.com" />
<option label="Google" value="http://www.google.com" />
<option label="Microsoft" value="http://www.microsoft.com" />
</datalist><br />
Username: <input type="text" name="usr_name" />
Encryption: <keygen name="security" />

<input type ="submit" value="submit" />

</form>
<hr />
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" name="a" value="50" />100
+<input type="number" name="b" value="50" />
=<output name="x" for="a b"></output>
<input type ="submit" value="submit" />
</form><hr />

<form action="eachjquery.htm" id="form_un" method="get" autocomplete="on">
First name: <input type="text" name="fname" /><br />
Last name: <input type="text" name="lname" /><br />
E-mail: <input type="email" name="email" autocomplete="off" /><br />
<input type="submit" />
</form><hr />

<form action="demo_form.asp" method="get" id="user_form">
E-mail: <input type="email" name="userid" /><br />
<input type="submit" value="Submit" />
<br />
<input type="submit" formaction="demo_admin.asp" value="Submit as admin" />
<br />
<input type="submit" formnovalidate="true"
value="Submit without validation" />
<br />
</form><hr />

<form action="demo_form.asp" novalidate="novalidate">
E-mail: <input type="email" name="user_email" />
<input type="submit" />
</form><hr />
User name: <input type="text" name="user_name" form="form_un"  autofocus="autofocus" />
<article>hihihihi
hihi
dsd
sdsds</article>
<menu>
<command onclick="alert('Hello World')">
Click Me!</command>
</menu>
<cite>click me</cite>
<embed src="http://w3schools.com/html5/helloworld.swf" />
hihihiihiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii<wbr/>iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiihihiihellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello123113333hellohellohellohellohellohellohellohellohellohello


</body>
</html>

What?s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?


CodeBehind is relevant to Visual Studio.NET only

         Code All build Assembly is placed inside the bin folder
Src the source cs file/vb fiel is placed in the source
folder and the source file is complied and assembly is
placed inside bin folder during runtime of the aspx page.

Cross Page Post backing in .NET


Asp.Net 2.0 fixed this with built-in features that allowed us to easily send information from one page to another.

Button control has property PostBackUrl that can be set to URL of any page in our ASP.Net WebSite where we want to transfer all form values to.

Tuesday 25 October 2011

Set Color of GridLines in Gridview

There are times when you will want to set the color of the grid lines in your GridView - however there is not to my knowledge a way of doing this declaratively. A workaround is to do this by tapping into the GridView's RowDataBound event.

Abstract Versus Interface in asp.net

The concept of Abstract classes and Interfaces is a bit confusing for beginners of Object Oriented programming. Therefore, I am trying to discuss the theoretical aspects of both the concepts and compare their usage. And finally I will demonstrate how to use them with C#.

Friday 21 October 2011

JQuery syntaxes


What is jQuery?

jQuery is a library of JavaScript Functions.
jQuery is a lightweight "write less, do more" JavaScript library.
The jQuery library contains the following features:

JSON in JavaScript:


JSON in JavaScript:

JSON stands for JavaScript Object Notation that  is a language independent text format which is fast and easy to understand. That means it is really very simple and easy to learn without sparing much time. In another words we can say that JavaScript Object Notation is a lightweight data-interchange format that is completely language independent but with some conventions.

How to convert XML to JSON in ASP.NET



How to convert XML to JSON in ASP.NET
JSON  is a lightweight data-interchange format. It is particularly useful because it can be 'decoded' easily by web page JavaScript into object form.

Thursday 20 October 2011

JSON


JSON: JavaScript Object Notation.
JSON is syntax for storing and exchanging text information. Much like XML.
JSON is smaller than XML, and faster and easier to parse.
What is JSON?

how to change textbox background color whenever validation fails using asp.net(custom validator)

I have a one requirement like changing the textboxes background whenever validation fails at that time I used the custom validator and JavaScript function to validate textboxes and change the textboxes background color for that write the following code in your aspx page

how to create watermark textbox using javascript

Introduction

Here I will explain how to create watermark textbox using JavaScript.

Description:

What is an application object and where we use application object in asp.net | application object sample using asp.net

What is an application object?

Application object is used to store the information and access variables from any page in application. Application object is same as session object only the difference is session object is used to maintain the session for particular user.

Monday 17 October 2011

Simple AJAX Example


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

Set a single select, a multiple select, checkboxes and a radio button in jquery



<!DOCTYPE html>
<html>
<head>
  <style>

Use the function argument to modify the value of an input box. in jquery



<!DOCTYPE html>
<html>
<head>

Set the value of an input box. in jquery



<!DOCTYPE html>
<html>
<head>
  <style>

Get the current value of the first element in the set of matched elements in jquery


Hi in this article i explain about how to get the current value of the first element in the set of matched elements in jquery

Get the single value from a single select and an array of values from a multiple select and display their values using jquery



<!DOCTYPE html>
<html>
<head>
  <style>

Find the value of an input box using jquery keyup() function



<!DOCTYPE html>

<html>

<head>

<style>

JQuery + AJAX example



In Demo.aspx page
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

ASPX vs ASCX (ASP.NET Page vs User Control)



A lot of web developers while learning ASP.NET get confused with the difference between an ASP.NET Page and ASP.NET User Control.

Sunday 16 October 2011

Saturday 15 October 2011

Friday 14 October 2011

Difference between asp and asp.net?.

"ASP (Active Server Pages) and ASP.NET are both server side
technologies for building web sites and web applications, ASP.NET is

Thursday 13 October 2011

What are the various ways of securing a web site that could prevent from hacking etc .. ?

  What are the various ways of securing a web site that could prevent from hacking etc .. ?

What is the < machinekey element and what two ASP.NET technologies is it used for?

Configures keys to use for encryption and decryption of forms
authentication cookie data and view state data, and for verification of

Can we handle the error and redirect to some pages using web.config?

Yes, we can do this, but to handle errors, we must know the error
codes; only then we can take the user to a proper error message page,
else it may confuse the user.

How do you implement Paging in .Net?

The DataGrid provides the means to display a group of records from the
data source (for example, the first 10), and then navigate to the
"page" containing the next 10 records, and so on through the data.

HttpContext of the first page. · Can you create an app domain?

Yes, We can create user app domain by calling on of the following
overload static methods of the System.AppDomain class

What are the various security methods which IIS Provides apart from ..NET ?

The various security methods which IIS provides are
a) Authentication Modes

What is Web Gardening? How would using it affect a design?

The Web Garden Model
The Web garden model is configurable through the section of the
machine.config file. Notice that the section is the only configuration

What is view state?.where it stored?.can we disable it?

The web is state-less protocol, so the page gets instantiated,

executed, rendered and then disposed on every round trip to the server.

The developers code to add "statefulness" to the page by using

Ajax Example

 in the javascript function write the below code

function test()
{

Wednesday 12 October 2011

how to bind data to DataGridView in windows form

Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.DataSet
Public Class Form1

how to set connection string in vb.net

Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.DataSet
Public Class Form1

Monday 10 October 2011

Introduction to 3-Tier Architecture in .NET


Introduction

Here I will explain about uses of 3-Tier architecture and how to create 3-tier architecture for our project in asp.net 

Tuesday 4 October 2011

page indexing and row databound in GridView

Protected Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridView1.PageIndexChanging

Monday 3 October 2011

How to create custom paging in Repeater control?

The Repeater control in ASP.NET is used to show records from the database. The data display in the repeater control custom design. For example we cannot use custom design in grid view control, but it is possible to use

calling javascript function in vb net

Page.RegisterClientScriptBlock("SCRIPTNAME","<script language='javascript'>compute();</script>")

Redirect page to another URL (vb.net)


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="rojas.aspx.vb" Inherits="rojas" %>

Timeout in javascript

Timeouts are like a timer. It can allow you to execute a section of code after a specified amount of time has passed. If you have viewed this page for 30 seconds, you have probably noticed a working example of this. Here is the code used : 

Using timeouts in JavaScript

Now and again it can happen that you want to time some task on your web page. For example you want to display the current time value on your site. In this case you need to update your page in every seconds. Don't worry! This task is quite simple using JavaScript. 

Friday 30 September 2011

Javascript date objects

javascript date and time object

The Date object is useful when you want to display a date or use a timestamp in some sort of calculation. In Java, you can either make a Date object by supplying the date of your choice, or you can let JavaScript create a Date object based on your visitor's system clock. It is usually best to let JavaScript simply use the system clock.

Get Hour, Second and Minute from Current time (VB.net)

<script language="vb" runat="server">

    Sub Page_Load()

Get Hour from DateTime

Imports System

Public Class Greeting
     Shared Sub Main()
        Dim dtCurrent As System.DateTime
        Dim iHour As Integer

        dtCurrent = dtCurrent.Now()
        iHour = dtCurrent.Hour

        If (iHour < 12Then
            Console.Writeline("Good Morning!")
        End If
        If (iHour >= 12And (iHour < 18Then
            Console.WriteLine("Good Afternoon!")
        End If
        If (iHour >= 18Then
            Console.WriteLine("Good Evening!")
        End If
    End Sub

End Class

Mid Function


The Mid function returns a specified number of characters from a string. The Mid function returns the portion of the designated string for a designated length starting from any position in the string. The Function will return the requested number of characters from a string. The Length of Characters To Pull parameter is optional. 

Javascript code to get first day of a month

<html>
<head>
<script type="text/javascript">

JavaScript Date functions


Date Object

The Date object is used to work with dates and times.
Date objects are created with new Date().
There are four ways of instantiating a date:

Friday 23 September 2011

OOPs Interview Questions

Q: How will you define a CLASS ?

A: All classes in Visual Basic. NET are defined in a .VB file (as oppose to .CLS file in vb6), Also .VB file may contain one or more classes. The basic syntax of a class is as follows:

What is Boxing and UnBoxing?

Description: 
Before We talk about Boxing and Unboxing let us understand aboutC# types.  
Value Types:
A variable representing an object of value type contains the object itself. (It does not contain a pointer to the object). Different value types are

In which namespace does StringBuilder class exist?

n which namespace does StringBuilder class exist?
Answer:
 System.Text namespace.