by Administrator
17. October 2011 11:43
یہ ایک تجرباتی تحریر ہے اردو کی۔
یہ ایک تجرباتی تحریر ہے اردو کی۔
یہ ایک تجرباتی تحریر ہے اردو کی۔
یہ ایک تجرباتی تحریر ہے اردو کی۔
یہ ایک تجرباتی تحریر ہے اردو کی۔
.jpg)
b0295c9e-15a1-4124-9e8a-bad6c5d005e0|0|.0
Tags:
by Zahid Iqbal
11. August 2011 21:42
In this blog, I will try to explain how to create a Hello World ASP.Net MVC application
Before developing ASP.Net MVC 2 Application you have care about Visual Studio requirements
- Visual Studio 2010 any edition or
- Free Visual Web Developer Express
- There is nothing more to do because these both already include ASP.Net MVC 2 by default
- For Visual Studio 2008 you have to
- SP1 (any edition of VS 2008)
- Visual Web Developer 2008 with SP1
- Because these do not include ASP.Net MVC 2 by defaul so you need to install
- Install ASP.Net MVC 2, you can download from http://www.asp.net/mvc/
After fulfilling the requirements mentioned above, I suppose you are working in VS 2010
- Now open VS 2010
- Click on File
- Click on Project
- There will be two types of ASP.Net MVC projects templates
- ASP.Net MVC 2 Web Application
- ASP.Net MVC 2 Empty Web Application
- I click on ASP.Net MVC 2 Empty Web Application
- Name your application whatever you want I here put name MyFirstHelloWorld
- Click Ok

You can see various structures here as shown in picture above. You can say in other words, MVC has created a road map for us. Using this road map or structure we can create our MVC application.
For adding Controller, you just need to right click on Controllers -> Add New Controller
For adding Models, right click on Models -> Add New Model
For adding Views, right click on Views -> Add New Views
Remember, in model, you can just add classes. It is just App_Code in simple ASP.Net
Now come to point
- Right click Controller
- Add -> Controller
- Name it whatever your want
- Click on Add button


It just create HelloWordController Class having Index() Action with returning object ActionResult and View().
Now if anyone calls HelloWorld from web browser, it first calls the HelloWorldController. It then calls Index () function. This Index function will return View() and this View() will be translated into ActionResult. In the lass this ActionResult will display information on the web browser.
- Now add new Controller by click on Controller -> Add -> Controller
- You can also add Controller by clicking on ActionResult

- You can name whatever you want but here i left it same as it is now Click on Add

- You can see in solution explorer, in Views it added Index.aspx web page here
- Now come to Index.aspx web page,

- Just for testing I wrote some thing...
- Now press CRTL + F5
- You will see output mentioned below

- Oh My God, What happened, I did what as instructions mentioned then why this error flagged
- Don't be panic
- This is error because you have not yet invoked any kind of action
- If you remember out action was HelloWorld and this HelloWorld will invoke Index.aspx web page
- Now go to URL and pad right HelloWorld and see the result

- Note: If you type index.aspx then it will flag error of HTTP404. I let this error to ender users to know why it is happened
by Zahid Iqbal
10. August 2011 21:11
It is an XML query language to select specific parts of an XML document. Using XPATH you can address or filter elements and text in a XML document. For instance a simple XPATH expression like “Invoice/Amount” states find “Amount” node which are children of “Invoice” node.
by Zahid Iqbal
10. August 2011 21:09
XSLT is a rule based language used to transform XML documents in to other file formats. XSLT are nothing but generic transformation rules which can be applied to transform XML document to HTML, CS, Rich text etc.

You can see in the above figure how the XSLT processor takes the XML file and applies the XSLT transformation to produce a different document.
by Zahid Iqbal
10. August 2011 21:08
The XML API for the .NET Framework comprises the following set of functionalities:
XML readers
With XML readers the client application get reference to instance of reader class. Reader class allows you to scroll forward through the contents like moving from node to node or element to element. You can compare it with the “SqlDataReader” object in ADO.NET which is forward only. In short XML reader allows you to browse through the XML document.
XML writers
Using XML writers you can store the XML contents to any other storage media. For instance you want to store the whole in memory XML to a physical file or any other media.
XML document classes
XML documents provides a in memory representation for the data in an XMLDOM structure as defined by W3C. It also supports browsing and editing of the document. So it gives you a complete memory tree structure representation of your XML document.