Abhijit's World of .NET Blog
Thursday, December 31, 2009
Happy New Year 2010
Wish you all lots of joy and happiness.
Regards,
Abhijit
Saturday, November 7, 2009
Prize winner in Competition “Best ASP.NET article of Sept 2009″
Thanks again to all of you. Hope to publish many more articles for you !
Wednesday, October 21, 2009
Who is Accessing Your System ?
For using WMI you need to add one DLL called System.Management.dll and add the namespace as
[sourcecode language="csharp"]
using System.Management
[/sourcecode]
Now Read the current Session of your system.
[sourcecode language="csharp"]
private void Read_Current_Session()
{
try
{
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("root\\CIMV2",
"SELECT * FROM Win32_ServerConnection");
foreach (ManagementObject queryObj in searcher.Get())
{
String RemoteIPAddress = queryObj["ComputerName"].ToString();
String RemoteUserName = queryObj["UserName"].ToString();
String RemoteActiveTime = queryObj["ActiveTime"].ToString();
}
}
catch (ManagementException e)
{
MessageBox.Show("WMI Error: " + e.Message);
}
}
[/sourcecode]
Few Years back I have developed one Open Source Tool (NetSpY) based on WMI and MQL. NetSpy (NetWorkSpy) is an Small Windows based application which will continiouly monitor your shared folder in the network and will generate the complete log of the accessing user activities. This can show you the immidiate popup message that who is accessing right now.
If you are interested please have a look over here,
Net Spy: Your Network Spy That Monitor Your System In Network And Generate Log For Any Changes
Monday, October 19, 2009
Beginners Guide’s to ASP.NET MVC Framework – Part 1 of n
This article describes overview of ASP.NET MVC Framework , MVC Control Flow etc.
This article is the Part 1 of the ASP.NET MVC Framework series. In this article I have describes very basic over view of MVC Framework and the control flow of MVC. I will write a few articles in this series which will help all the beginners to move ahead. This article is only about what MVC is.
Overview
The Model-View-Controller (MVC) design pattern is an architectural design patterns for any standard development that separates the components of an application. This allows application to handle very flexible and extensible and easy to handle. ASP.NET MVC Framework is also one of the standard web development frameworks which separate the components of web development application different components.
ASP.NET MVC Framework having three main components
- Model
- View
- Controller
Model: The model manages the behavior and data of the application domain, responds to requests for information about its state from the view, and responds to instructions to change state (usually from the controller).
View: This represent the presentation layer of the web application. The view manages the display of information based on the data of model that is requested by controller.
Controller: Controller handles the user interaction with the web application. User request comes through controller to model and manipulate the records from it and then render the data using View to UI.
Below diagram showing the overview of these three components
Request Flow for ASP.NET MVC Framework
- Request comes from User to Controller
- Controller processes request and forms a data Model
- Model is passed to View
- View transforms Model into appropriate output format
- Response is rendered to Browser
Above picture showing you the actual flow of ASP.NET MVP Framework. Request comes from client to Controller and controller decided which model to used and based on that data rendered into browser.
Now, just have a closer look into to the MVC Flow,
In the next article I will give the explanation of each of every step. You just need to remember these are the basic flow of an MVC Application.
ASP.NET Web Forms and MVC
MVC is not a replacement if ASP.NET Web Form based development. This seats on the top of ASP.NET Development. MVC Framework simply divides the overall application architecture into three components.
For More information on the basic of MVC Framework please read :
ASP.NET MVC Overview (C#)
Summary
This is the startup article for MVC beginners. Many more to come. Where I will explain details of each of them with sample application. Finally there would be a complete ASP.NET project on MVC Framework. Hope this series will be helpful for all.
Saturday, October 10, 2009
Using Bookmark in Visual Studio
Introduction
As name suggests, bookmarking speedup your code navigation in visual studio. There may be some portion of code where we need to move very frequently. Generally we scroll the page and move to that section, but Visual studio provides great features by which we can move to a particular section very quickly using some shortcut keys. This is called Bookmarking of Code.
Below are the set of Icons which are used to navigate the code using Bookmark.
How To Use
We can place the bookmark by clicking on Bookmark icon or using keys
Ctrl + K, Ctrl + K.
Below is the sample code where I have putted two bookmarks in different section of code.Now we can easily navigate among those breakpoint using
Ctrl + K, Ctrl + N
for Next Bookmark and Ctrl + K , Ctrl + p
for Previous mark. We can achieve the same using following toolbar icon.This is very much easy to use and its give you very fast navigation throughout the code.
Using Bookmark Window:
Visual Studio provides you Bookmark window where you can get list of all bookmarked section.
Now, by selecting particular bookmark from the Bookmarks list we can easily move to the particular section.
Renaming BookMarks
For easy reference we can also rename bookmark so that we can easily identify them. This helps us to easily move to particular code block based on the name given. This is useful when we are having many bookmarks in the bookmark list.
As I have renamed my bookmark list as below
Summary
This may not be new to many of us, but it may helpful for some beginners. Using this features we can navingate our code very easily. Please provide your valuable suggestion and feedback.
Tuesday, September 29, 2009
My New Article : Beginner's Guide : Exploring IIS 6.0 With ASP.NET
I have also mentioned few Tips which are very commonly used in dealing with IIS. Hope this will help the beginners who are struggling with site hosting on IIS and configure it. Please read full article @ Beginner's Guide : Exploring IIS 6.0 With ASP.NET
Please give your valuable suggestion and feedback to improve this article.
Saturday, September 26, 2009
My New Article : DotNetNuke : User Creation and Role Assignment : For Absolute Beginners!
Please provide your feedback and suggestion for improve this article. Thanks
Tuesday, September 22, 2009
"Platinum" Membership status @ Code Project
Here is wishes from CP Members . Thanks to all for best wishes !!
Thanks Again !
My New Article : Quick Overview: Temporary Tables in SQL Server 2005
If you are really intereseted, then please read my article complete here, Quick Overview: Temporary Tables in SQL Server 2005
Please give your feedback and valuable suggestion to improve this article.
Tuesday, August 25, 2009
Prize winner in Competition “Best ASP.NET article of July 2009″
Thanks again to all of you.
Sunday, August 16, 2009
Most Commonly Used Functions in SQL Server 2005/2008
Objective of this article is to put all mostly used function related in SQL Server 2005/2008 under a sinlge article. There are several function that we are used regularly in SQL Server 2005/2008. This article is will a common place for all those function with proper example.
But, I need your help. This Table of Contents and Article is editable by all CodeProject Silver members and above. What I want you to do is replace the entries in the Table of Contents below add as many as function you aware on SQL Server 2005 or above. This will really help beginners to find out all of them under a single article.
Please Visit here, Most Commonly Used Functions in SQL Server 2005/2008.
Thanks for your support.
Saturday, August 15, 2009
My New Article : A Closer Look Inside RAISERROR - SQLServer 2005
A Closer Look Inside RAISERROR - SQLServer 2005
Saturday, August 8, 2009
My New Article : Test Your ASP.NET WebServices using SOAP UI
Please give your suggestion and feedback .
Saturday, August 1, 2009
My New Article : Overview of Error in SQL Server 2005 Handling
Please give your suggestion and feedback .
Wednesday, July 29, 2009
My New Article : Overview of VIEW in SQL Server 2005
This is the Part 1. In the next part I will write on Parameterized View and Indexing of View
Please give your valuable suggestion and feedback.
Monday, July 20, 2009
Prize winner in Competition "Best ASP.NET article of June 2009"
I have published another article on Remote IIS Debugging in this month. Hope this will also help you.
Please give your suggestion and feedback to improve my articles. Thanks again.
Wednesday, July 15, 2009
My New Article : Debug your web application Hosted on Remote IIS
Please give your valuable suggestion and feedback.
Tuesday, July 7, 2009
XSL Transformation : Rendering XML using XSL - HTML Output
Some times we need to display the XML data in our web application in specific format. XSLT provides the ability to display the XML document in some specific format like HTML, PDF etc. We can select a a XML file or a portion of XML File and using XSL Transformation we can display in some specific format.
An XSL transformation need an XML document to transform and an XSL style sheet describing how the transformation will take place. An XSLT engine then transforms the XML document via the XSL style sheet and will produce the output in the format specified by the style sheet.
How to Implement ?
1. Create Data Base :
Rather than reading the data from xml, I have read the data from database. First of all I have create an DB Student with table name "StudentDetails" . Table contain some dummy data like,
2. Add XSL File
Before, reading the data from database, we have to create the XSL file, We can add XSL file by just right click on the project > Add New Item >Select XSLT File
3. Desing XSL
Now, Designing XSL is one of the important task, and there are many things that related with XSL . In my case, this is very simple XSL, but if you need to learn in details, I will suggest you to read from W3School. First of all have a look into the XML data which I have got from the dataset.
And based on that we need to desing the XSL File. Below is the StudentDetails XSL
[sourcecode language='xml']
Roll
Name
Address
[/sourcecode]
Now, have a look into the code,
Read the data from database and put it into dataset. We can easily get the XML from dataset using.
[sourcecode language='csharp']
string XMLString=ds.GetXml();
[/sourcecode]
Below code is used to read data from database
[sourcecode language='csharp']
public string strstudentDetails = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
string _strConnectionString = "Data Source=.\\sqlexpress;Initial Catalog=Student;Integrated Security=True";
string _strquery = "select * from studentDetails";
SqlConnection con = new SqlConnection(_strConnectionString);
DataSet ds = new DataSet("Students");
SqlDataAdapter da = new SqlDataAdapter(_strquery, con);
da.Fill(ds);
//Get the XML From DataSet
string strXML = ds.GetXml();
strstudentDetails=GetHtml(Server.MapPath("~/xsl/studentDetails.xsl"), strXML);
}
[/sourcecode]
GetHtml function actually doing the job. Its taking XSL Stylesheet and XML data as parameter and returning the html output
[sourcecode language='csharp']
///
/// Get HTML From XML and XSL
///
///
XSL File Path
///
XML String
///
public static string GetHtml(string xsltPath, string xml)
{
MemoryStream stream = new MemoryStream(ASCIIEncoding.Default.GetBytes(xml));
XPathDocument document = new XPathDocument(stream);
StringWriter writer = new StringWriter();
XslCompiledTransform transform = new XslCompiledTransform();
transform.Load(xsltPath);
transform.Transform(document, null, writer);
return writer.ToString();
}
}
[/sourcecode]
Now for displaying the result, we have to put following line in the aspx page,
[sourcecode language='html']
[/sourcecode]
and the output like,
Hope this will help you to move ahead with XSL Transformation.
Thankyou
Wednesday, July 1, 2009
Sunday, June 21, 2009
My Birth Day
Wish all of you all the best.
Thank you !!
Thursday, June 11, 2009
My Recent Article :Debug Your ASP.NET Application that Hosted on IIS : Process Attach and Identify which process to attach
This article describe how to debug a web application which is hosted on IIS. It also describe how to select a particular process to attach with your application when multiple worker process are running. Please read details over here and give your suggestions and feedback
Thank you.
Thursday, April 30, 2009
My New Dell Laptop
Recently I purchased a Dell Inspiron 1545 Notebook . The design by Dell is quite impressive as it has been released with different colors. I have go for BLUE. My Laptop configuration is 4 GB RAM, 320 GB HDD, C2D Processor and 1.3 MP Camera , OS Vista . Hmm.. along with that, got a Carry Case. I love this ....
Tuesday, March 24, 2009
First Prize winner in Competition "Best ASP.NET article of January 2009"
Friday, January 9, 2009
CodeProject MVP for 2009
I have received an MVP Award from codeproject for the articles what ever I have written on codeprject and helps other developers through the forums.
Here is the some content of the mail that I have received from Chris Maunder , C0-Founder of Codeproject.com
From: Chris Maunder
Sent: Tuesday, January 06, 2009 5:37 AM
To: Abhijit Jana
Subject: Code Project MVP recognition
Hi Abhijit
Congratulations!
In recognition of your outstanding contributions to the community, either through the forums or through articles, you have been awarded CodeProject MVP status for 2009.
Your MVP status will be recognized through the MVP icon you will have next to your forum postings as well as a notice in your member profile. Also, as formal recognition of your award status we will be sending out certificates to all our MVPs ........
Again, Thank you for all the help you have provided to the community.
cheers,
Chris Maunder
Co-founder
The Code Project
www.codeproject.com
Thanks you Chirs and Your Team .
I would also like to thanks all CP members and specially My Guru (Sacha barber ) , christian Graus and Navaneeth . I have learned a lot from all of them . They all are Rock !!!
And Finally , Codeproject You are Rock !!!
Labels
- .NET (1)
- .NET 4.0 (10)
- ASP.Net (2)
- ASP.NET (12)
- asp.net 4.0 (2)
- ASP.NET 4.0 (1)
- Awards (2)
- C# (8)
- C# 4.0 (3)
- code (1)
- codeproject (5)
- Debugging (2)
- Enterprise Library 4.1 (1)
- General (21)
- IIS (1)
- IntelliTrace (2)
- Microsoft ASP.NET Web Site (4)
- MSDN (1)
- Multithreaded Debugging (1)
- MVC (1)
- MVC Framework (1)
- MVP (3)
- My Articles (15)
- Parallel Debugging (1)
- RenderingMode (1)
- SQL Server 2005 (6)
- VideoTutorial (1)
- View State (1)
- Visual Studio 2010 (9)
- VS 2010 (1)
- VSX (1)
- Web Services (1)
- WPF (1)
ASP.NET Books
Blogger Showcase - Submit Your Blog Blogger Templates created by Deluxe Templates
Wordpress theme by Site5