C# : Tutorial of Asp.net with c# and example

Example and code about windows application, web application, SQL, C#, WPF etc which is helpful to developer and programer.

Search This Blog

How to insert data in sql server using asp with c sharp

♠ Posted by uvesh master in

Insert Data in Sql server 2012


  protected void InsertBtn_Click(object sender, EventArgs e)
    {
        SqlConnection conn = new SqlConnection(@"Data Source=Home\SQLExpress;Initial Catalog=MyDatabase;Integrated Security=True");
        SqlCommand insert = new SqlCommand("insert into tblUser(Uid, Name, Mobile, Email) values(@uid, @name, @mobile, @Email)", conn);
        //SqlCommand insert = new SqlCommand("insert into tblUser values('"+1+"','"+Name.Text+"','"+Mobile.Text+"','"+Email.Text+"')",conn);
        insert.Parameters.AddWithValue("@uid", 1);
        insert.Parameters.AddWithValue("@name", Name.Text);
        insert.Parameters.AddWithValue("@mobile", Mobile.Text);
        insert.Parameters.AddWithValue("@Email", Email.Text);
        try
        {
            conn.Open();
            insert.ExecuteNonQuery();

        }
        catch (Exception ex)
        {
            LMsg.Text = ex.Message;
        }
        finally
        {
            conn.Close();
        }
        Name.Text = "";
        Mobile.Text = "";
        Email.Text = "";

    }

Improve Your Answer as comment below.

If our post is useful please share and comment on our post for more post and detail Visit :


http://aspdotnethelpmaster.blogspot.in/

Disadvantages of WPF

♠ Posted by asp blogger in ,

Disadvantages of WPF

Disadvantages of WPF as Follow:

There's greater support in the 3rd-party control space for WinForms. (That's changing, but for now by advantage of time, WinForms has greater support in the community). 

WPF's in-box control suite is far more limited than that of WinForms.

Most developers already know WinForms; WPF provides a new learning curve.

Winform takes smaller resources than WPF.

WPF will not run on windows 2000 or lower.

No MDI child mode.

WPF will not run on windows 2000 or lower.

Winform takes smaller resources than WPF because you can test this your self by create 1 project in windowapplication with 1 empty form same as in Wpf Create one project then run both project WPF project take more time.


Disadvantages of WPF


Improve Your Answer as comment below.

If our post is useful please share and comment on our post for more post and detail Visit :


http://aspdotnethelpmaster.blogspot.in/

Advantages of WPF

♠ Posted by asp blogger in ,

Advantages of WPF(Windows Presentation Foundation)

List of Advantage of WPF


Easy to create an unique Look and Feel.

Power full stylist and programmer friendly structure.

Support Windows Forms.

The future technology for developing Vista Applications.

The ability to reuse existing code.

Highly advanced data binding possible.

Much quicker to develop normal apps.once you are experienced.

Declarative Programming: Declarative and procedural code (You can use Procedural if you want)
WPF takes the declarative programming to the next level with the introduction of Extensible Application Markup Language(XAML).

Data binding works and is simple. Highly advanced data binding possible Requires a less code behind to do common things.

Framework much smarter.

Much more maintainable apps (from better data binding and declarative code with better separation)

Excellent layout.

Excellent document support.

Multi media support.

Vector Graphics simplifes painting Operations

3D Animations.

WPF Everywhere Idea (Silverlight and Microframework)

It's more flexible, so you can do more things without having to write or buy new controls
XAML makes it easy to create and edit your GUI, and allows the work to be split between a designer (XAML) and a programmer (C#, VB.NET etc.)

It allows you to make user interfaces for both Windows applications and web applications (Silverlight/XBAP)

It's newer and thereby more in tune with current standards

Hardware Acceleration: WPF is built on top of direct 3D, WPF applications can get the benefit of hardware acceleration for smoother graphics and all round better performance.Uses hardware acceleration for drawing the GUI, for better performance

Windows Forms is feature complete. Not perfect, but everything you need is in there. WPF is great, you can do a lot of graphical tricks.

 If you are building apps where unique look and feel, and creating a superior user experience are real goals, then WPF is probably a better choice.

Large Integration: Before WPF come in market, there was very difficult to use 3D, Video, Speech, and rich document viewing in addition to normal 2D Graphics and controls would have to learn and use several independent technologies.

Resolution Independence: WPF applications are device independent. Like normal applications it do not get decrease the size as the resolution gets increase. This is possible because WPF emphasis on vector graphics.

XAML is like HTML in web used for creating the interface, resulting graphical designers are empowered to contribute directly to the look and feel of applications.

Advantages Summary:

  • Easy to create an unique Look and Feel.
  • Power full stylist and programmer friendly structure.
  • Support Windows Forms.
  • The future technology for developing Vista Applications.
  • The ability to reuse existing code.
  • Highly advanced data binding possible.
  • Much quicker to develop normal apps.
  • Framework much smarter.
  • Excellent layout.
  • Excellent document support.
  • Multi media support.
  • Vector Graphics simplifies painting Operations
  • 3D Animations.
WPF Advantages




Improve Your Answer as comment below.

If our post is useful please share and comment on our post for more post and detail Visit :


http://aspdotnethelpmaster.blogspot.in/

What is wpf

♠ Posted by asp blogger in ,

What is WPF(Windows Presentation Foundation)

Definition of Windows Presentation Foundation (WPF)

Windows Presentation Foundation (WPF) is a next-generation presentation system for building Windows client applications with visually stunning user experiences. With WPF, you can create a wide range of both standalone and browser-hosted applications.

WPF, earlier name is Avalon, was initially released as part of.NetFramework3.0. Since then, Microsoft has released five major WPF versions.

WPF Version List as follow:

  1. WPF 3.0 (Nov 2006).
  2. WPF 3.5 (Nov 2007).
  3. WPF 3.5sp1 (Aug 2008).
  4. WPF 4 (April 2010).
  5. WPF 4.5 (August 2012).

Windows Presentation Foundation (or WPF) is a graphical subsystem for rendering user interfaces in Windows-based applications by Microsoft.

The Optimum User Experience Since the very earliest days of WPF/XAML development, there has always been a need to inspect the visual tree. Early Pre-Alpha builds of Blend had a debug command which would dump the entire visual tree to a text file so its become easy.

The core of WPF is a resolution-independent and vector-based rendering engine that is built to take advantage of modern graphics hardware. WPF extends the core with a comprehensive set of application-development features that include Extensible Application Markup Language (XAML), controls, data binding, layout, 2-D and 3-D graphics, animation, styles, templates, documents, media, text, and typography. WPF is included in the Microsoft .NET Framework, so you can build applications that incorporate other elements of the .NET Framework class library.

WPF offers additional programming enhancements for Windows client application development. One obvious enhancement is the ability to develop an application using both markup and code-behind, an experience that ASP.NET developers should be familiar with. You generally use Extensible Application Markup Language (XAML) markup to implement the appearance of an application while using managed programming languages (code-behind) to implement its behavior.

what is WPF?



Improve Your Answer as comment below.

If our post is useful please share and comment on our post for more post and detail Visit :


http://aspdotnethelpmaster.blogspot.in/

About Us

♠ Posted by asp blogger in

About Us

Aspdotnethelpmaster.blogspot.com is a blog which contain lots of post which help to professional programmer and trainee to make their programming better. We always ready to help you about any kind of problem or question related to programming. you can comment on our post or improve our post or you can mail us for any query. 

We are daily one or more post on our blog with any programming concept like Asp.Net, VB.Net, C#, SQL, JQuery, WPF, Visual Basic, web services, SQL Query, Code, Syntax, Example of Asp.Net, Example of VB.Net, Example of C#, Example of JQuery, Example of WPF, Example of SQL, Demo, and Tutorial of Asp.Net and C# etc.

About Us





http://aspdotnethelpmaster.blogspot.in/

Disadvatages of vb dot net Technology

♠ Posted by asp blogger in

Disadvantages of VB.NET

  1. Multi platform support is not available from Microsoft and isn't available straight after installing Visual Studio.
  2. Managed code can be slower than native code.
  3. Not suitable for High End Application.
  4. VB.Net performance lower compare to C,C++.
  5. Only few Operating System supports .NET.
  6. built in methods not available.
  7. .NET framework is free to download but Code Editor is costly. 
  8. .Net is very easy to reverse engineer any intelligent can decode your DLL or code. If you do not obfuscate your code, you may as well publish the source code.
  9. Additional installation requirements :The footprint of your application can be huge if it requires a version of .Net, which is not already on the computer and therefore must be  install first.
  10. Visual basic is a proprietary programming language written by Microsoft, so programs written in Visual basic cannot, easily, be transferred to other operating systems.
  11. There are some, fairly minor disadvantages compared with C,C++ has better declaration of arrays and its possible to initialize an array of structures in C at declaration time; this is impossible in VB.
  12. Does not support modern technologies, In Visual Basic 6, you cannot work with many modern technologies, especially the web technologies. 
  13. You cannot make a dynamic web site. Dynamic website is an online application for which VB6 does not have the development facilities. Though Internet programming is supported in Visual Basic 6. But you don't have enough power and flexibilities for making web applications using Visual Basic 6.
  14. Performance issue, The VB.NET applications run on .NET framework, which is an extra layer between the operating system and the application. So there is a performance issue.
Disadvantages of vb.net





Improve Your Answer as comment below.

If our post is useful please share and comment on our post for more post and detail Visit :


http://aspdotnethelpmaster.blogspot.in/

Advantages of vb dot net and its use

♠ Posted by asp blogger in ,

Advantages of VB.NET



All features of the .NET framework are already available in VB.NET. its provides managed code execution that runs under the Common Language Runtime (CLR), resulting in robust, stable and secure applications.  

VB.NET is totally base on object oriented approach. This is not available in a major addition that VB6 and other earlier release.

The .NET framework comes with ADO.NET, which follows the disconnected paradigm, i.e. once the required records are fetched the connection no longer exists. It also retrieves the records that are expected to be accessed in the immediate future. Because of it application becomes more Scalable.

VB.NET uses XML to transfer data between the various layers i.e. data are passed as simple text strings.

Error handling has changed in VB.NET. A new Try-Catch-Finally block has been introduced to handle errors and exceptions as a unit, allowing appropriate action to be taken at the place the error occurred thus discouraging the use of ON ERROR GOTO statement. It is better to the maintainability of the code.

Many situations developers need spawning of a new thread to run as a background process and increase the usability of the application.

Security has become more strong in VB.NET. In addition to the role-based security in VB6, VB.NET comes with a new security model, Code Access security. This security controls on what the code can access. For example you can set the security to a component such that the component cannot access the database. This type of security is important because it allows building components that can be trusted to various degrees.

The CLR takes care of garbage collection i.e. the CLR releases resources as soon as an object is no more in use. This relieves the developer from thinking of ways to manage memory. CLR does this for them.

Various legacy VB functions (provided in the Microsoft.VisualBasic namespace, and can be used by other languages with a reference to the Microsoft.VisualBasic.dll).Many of these can be harmful to performance if used unwisely, however, and many people believe they should be avoided for the most part.


Summary of VB.Net Advantages



  • Powerful Windows-based Applications.
  • Building Web-based Applications.
  • Powerful, Flexible, Simplified Data Access.
  • Direct Access to the Platform.
  • Simplified Deployment.
  • Full Object-Oriented Constructs.
  • XML Web Services.
  • Mobile Applications.
  • Support for optional parameters - very handy for some COM interoperability.
Type Conversion -: Prevents unintended type conversions. This means that you cannot accidentally assign ‘Float’ value to a ‘String’ variable; however, this is not always foolproof. VB.Net does allow some unintended type conversions, such as an integer value could be placed in a ‘Long’ variable. Support for late binding with Option Strict off - type safety at compile time goes out of the window, but legacy libraries which don't have strongly typed interfaces become easier to use.

For fast GUI Design -: Easy to use Rapid Application Design (RAD) interface – Within a less time a complete Graphical User Interface (GUI) can be produced; thus requiring less programming time and less design time.

Default inbuilt code -: When creating a new project, or just adding a new form or button, the environment will automatically generate the default coding to have the objects appear; in some cases there are wizards that can provide default coding to have some functionality within the application. This translates to a working application can be designed and coded in a fraction of time than some other languages.

VB.Net advantages


Improve Your Answer as comment below.

If our post is useful please share and comment on our post for more post and detail Visit :


http://aspdotnethelpmaster.blogspot.in/