Advertisements

Friday, July 20, 2012

// // Leave a Comment

Release Date of Windows 8

Hi,


We are waiting for you so long, I think you are also waiting for... 




I am talking about Release Date of Upcoming Version of Windows. Worlds Most popular Operating System is now back with a Bang and Performance, Feature, Speed and Security Rich (Richer than MS), Windows 8.



What We Waited and When we received Publicly:


Developer Preview on : September 13, 2011

Consumer Preview on : On 29 February 2012

Release Preview on : May 31, 2012


And Now the Official announcement of Release Date of Windows 8.


Going to Buy on the First day and you........

Read More

Sunday, July 15, 2012

// // 2 comments

Installing ASP.NET in IIS

Hi,
Today we will learn how to Install .NET in IIS.
By default IIS is turned Off. To Turn on we will go to Control panel > programs > turn windows feature on or off.

Check all options by Expanding and Make sure that you got the Internet Information Services checked fully as in Above screen. Then you need not to install any more scripts to host asp.net websites.

Now If ASP.NET Websites are not running and throwing error like

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032
Requested URL http://localhost:80/JOHNSAPP/DEFAULT.ASPX
Physical Path C:\inetpub\wwwroot\John\Default.aspx
You should Install ASP.NET (configure IIS for ASP.NET).

Here are some basic steps to do so,
Open Command Prompt as Administrator
Navigate to C:\
C:\>cd Windows

C:\Windows>cd Microsoft.NET

C:\Windows\Microsoft.NET>cd Framework

Now you will be at

C:\Windows\Microsoft.NET\Framework\

First Decide what version are you using. ASP.NET 1.0, 1.1, 2.0, 3, 3.5 , 4 or 4.5 (if Installed).
Then type following code in Command Prompt
C:\Windows\Microsoft.NET\Framework>cd v4.*      //installing ASP.NET V4.0 here.

C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i

 Command Prompt will Install Code and You are now Ready to Access your ASP.NET Site with Localhost.

Best of Luck....
John Bhatt
Read More

Friday, July 13, 2012

// // Leave a Comment

4 Years of Being Far From Family

Today,
I am going to write a blog about me, It's neither about Tech nor any other Courses. Its personal.


On the 13th of July 2008, I left my family to work. I've just gave Exams of +2 and worried about Exams. So I decided to go to India and do some job between the time period of Exams and Results. I have done a Basic Computer Course called SOP (Smart Office Professional) from UNIT-IT, then I did a crash course from Modern Computer Institute which took about 2 months.


When I left home, I expected a Basic average salary (about 5K INR), working with Computers, a Good office and blah blah...


I, a friend from Village Jagdish and my and Brother (in family relations) left home at the afternoon of 13th July which I still remember. Next Day morning , 14th July 2008, I was working with a Transportation Company named BEST ROADWAYS LIMITED. I was First time in India for permanent living and directly in Haryana. The Language of Haryana is some hard to hear and direct hits ear (but they are really nice). Slowly slowly I adjusted myself with atmosphere.
....
.....
.......


Now Summary of things what I think I got after leaving home.


  1. Experience of Work / Job.
  2. Completed my +2
  3. Pursuing Graduation
  4. DOEACC 'A' Level
  5. .NET Training / Web Development & Design
  6. Wide Experience in Computer Programming
  7. Some Good Friends
  8. Deep Introduction of Human Nature at Job.
  9. And Most Important.- A Loving and Caring Family 
My biggest earning which  I think is faith and believe of some people which can never be bought.

I can not describe the Joy of listening these Words. 'परदेश में होकर भी अपने  परिवार से ज्यादा प्यार करने वाले परिवार पाने वाले तुम्हे देखकर मुझे जलन होती है | '.

Read More

Wednesday, July 11, 2012

// // Leave a Comment

Thanks and Congratulations....

Just Got the 10,000th Visitor to make my blog hits..

Many many Thanks and Congratulations......
Read More

Sunday, July 8, 2012

// // Leave a Comment

State Management in ASP.NET part-1 (Cookies)

Hi,

I am Back with State Management Series.

In this post we are going to Talk about Cookies. After Reading this, you must be able to do following things:
  • Create Cookie
  • Access Cookie
  • Can answer Some Basic Q & A about Cookie
What is Need of Cookie?

Cookies are Required to Store Temporary data in Users system which may be Required during Session or after Session.

How Many Type of Cookie are there?
Cookies are generally of Two Type. Session wide or Persistent. Sessional cookies Expire as soon as User Closed Session means Browser. Persistent cookies expire after Defined Time. This can be Defined at the Time of Creation.

Who Make Cookies?

Cookie is always made by Application (Server) in Users/ Clients Browser and stored in Hard Disk of User. These are used to store Users Customized Appearance, other Values , Login Time etc for future Retrieval so that website can server him better.

Limitations of Cookie?

Cookies are open Invitations to Hackers.

Cookies can only store Little and Only String Type Data.



Now Lets Learn with Coding. First We will Create a Cookie named myCookie and Solve Earlier Problem with the Help of Cookie.
Now Code is Like Below:
protected void Page_Load(object sender, EventArgs e)
{

}
int x; // Made a Variable with Datatype Int for Future Use
HttpCookie myCookie; // Defined a Cookie named myCookie.
protected void Button1_Click(object sender, EventArgs e)
{
x = Convert.ToInt32(TextBox1.Text); // Converted textbox Value which we earlier Did.
myCookie = new HttpCookie("txtValue"); // Assigned Variable myCookie.
myCookie.Value = Convert.ToString(x); // Value assigned to myCookie.
Response.Cookies.Add(myCookie); //This Simple Made a Cookie that will Expire in Session End.
myCookie.Expires = DateTime.Now.AddMinutes(15); // We made is Persistent and stored it for Next 15 minutes.

}
protected void Button2_Click(object sender, EventArgs e)
{

HttpCookie storedCook = Request.Cookies["txtValue"]; // Requested from Server for Cookie
if (storedCook != null)
x = Convert.ToInt32(storedCook.Value); // Converted to Integer again.
TextBox1.Text = Convert.ToString(x * x); // Now Printed Value in Textbox.
}
Now Check....

Don't forget to add me on Google+, +John Bhatt .
Read More
// // Leave a Comment

State Management in ASP.NET

Hi Everybody,


I am once back with a blog/article/tutorial whatever you think/call it.


State Management :


HTTP Protocol is State less protocol. In Simple Language, Each and Every time We send a request to server, this is New to server.

To Understand this ,Suppose you took One Textbox and Two Buttons like in Image below:



Now, the task is To Enter Number in Textbox and Click in First Button to Convert to Integer format and then Click Second button to Print Square of Converted Integer in Textbox. What will you do. Lets look at code what I did here.

protected void Page_Load(object sender, EventArgs e)
{

}
int x;

protected void Button1_Click(object sender, EventArgs e)
{
x = Convert.ToInt32(TextBox1.Text);
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = Convert.ToString(x * x);
}


Now what would I get Result on Second Button Click event. Textbox Result will be 0 even I have entered any number. Don't agree, try this at home.


This is Because, at the time of Button2 Click new request is send to server and Initial Value of X is picked from server which is 0.


To Prevent the Loose of Data each time we send request to server, ASP.NET have implemented concept of State Management.

State Management is divided into 2 parts according to Functionality.

1) User Based State Management
  • Cookies
  • QueryStrings
  • ViewState
  • Controls
  • Hidden Fields
2) Server Based State Management
  • Session
  • Application
  • Profile


I am going to Describe all these States step by step in Different Posts.

All the Series has been posted on DotNetSpider at below Link Resources > Keep Reading.
Read More

Thursday, July 5, 2012

// // Leave a Comment

AutoCompleteExtender in Textbox

Hi,

We will learn how to enable AutoCompleteExtender in Textbox Control.


Here, We will learn to Map data from SQL Database to Textbox within Same Page. WebMethod in .cs Page.

Directly to Code:
ASPX Page Code



Vehicle No :










Now Code in ASPX.CS Page

Add these Namespages for below Code.
using System.Data; // For Dataset
using System.Data.SqlClient; // For SQlConnection/Adaptor
using System.Configuration; // Access Consting from Web.Config.
using System.Collections.Generic;



[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
public static string[] GetVehicleList(string prefixText, int count, string contextKey)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConToJohn"].ConnectionString);
SqlDataAdapter adp = new SqlDataAdapter("Select distinct VehicleNo from VehicleDispatch where VehicleNo like '%" + prefixText + "%'", con);
DataSet ds = new DataSet();
adp.Fill(ds, "Vehicles");
string[] VehicleNo = new string[ds.Tables["Vehicles"].Rows.Count];
for (int i = 0; i <= ds.Tables["Vehicles"].Rows.Count - 1; i++)
{
VehicleNo.SetValue(ds.Tables["Vehicles"].Rows[0][0].ToString(), i);
}
return VehicleNo;
}
I have Selected Only Unique Value from Database using SELECT DISTINCT .... command. If you want all records, Simply Change SQL Query to SELECT ..... Will be glad to hear from you... This Post is copied from DotNetFunda where I wrote in Code section.
Read More