Jack is Here, asp.net findings

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘code’

How Find a Software Scripts

A Developer’s Resource of helpful PHP Scripts, Tutorials and Applications Designed to help make your Life as a Webmaster Easier! Build Your Own Community with Zip Code Finder provided by PhpScripts. Visit the zipcode-finder.com for new type’s scripts, CRM, ASP Script, JSP Scripts and Zip Code Links to many Other Resources.Are you after a script that isn’t in the Free Scripts section? Then we can help! Click here to find out more about CRM, ERP, and eCommerce Customs Scripts .We have now added a PHP Tools and ASP Programs section, providing you with Free PHP Scripts such as Servers Side Script included MySQL.As time saving for adding more Free Scripts to extend our Current Selection of different types Scripts such as Auction , CRM ERP, AdSpaceSeller to Increase your Site’s Revenue, Inquiry Handler to Improve your Customer Relations, Cosmic Mailing to Keep your Clint up to date with new developments, and much more.

It should also be added Free scripts PHP for beginners to the most advanced code finder Technique.Zip prerequisite ASP,. NET, PHP Scripts code is live or search the Web customer support chat script source code which offer secure, reliable and fast connection between clients and support for the U.S.

It helps to improve trust, approval and confidence of clients for script code, standard sales projects and businesses such as software development, solution to the Web, Logo / Header Design sales, construction sites and related services in the United Kingdom

Features:

* Live support ASP Script offers secure and dedicated chat.

* Software can easily fit with any website.

* Live Web chat script is the reliable customer support system.

* That enables real-time communications to provide automatic updates of the page.

* Possible to view and save online chat history also sends this by mail.

* Software is selling your products, improving service and satisfaction.

* This is a webmaster of a complete online customer help software, website visitors and customers to provide full support for private life and a secure link.

* This is very easy to install, requires no additional control components and other server utility.

* Online business, chat, joint working meetings, conferences and congresses can be easily organized activities.

C# Dot Net And Vb Dot Net

When we use asp.net we have different language option available there are some of these language vb.net , c#.net, perl etc.So its depend upon the programmer which language they are using all of the language have there different syntax and language have there own charaterstics. In this article I have taken vb.net and c#.net. Some people likes vb.net simple style and some of people likes C# syntaxes. But the similar thing is that both of them using same plateform that is .net framerwork but there are some important difference between c# and vb.net:-

In vb.net we have optional parameters which help in development of COM interoperability. In vb.net we can use construct which is not in available in c#.net another feature of vb.net is late binding with Option Strict off .We can also use VB functionalities can be used by using Microsoft.VisualBasic namespace Another one of most beautiful feature of vb dot net is that it compiles code in the background so this is considered an advantage for small projects, people creating very large projects have found that the IDE slows down considerably as the project gets larger.

Now comes to c#.net in this now we can gernate XML documentation from source code but this is now been incorporated in Whidbey another good feature that is include in c#.net is operator overloading which is not avail ab.net and we use this statement which helps use to get unmanaged resource disposal simple. In c#.net we can access to Unsafe code which allows pointer arithmetic and we can also improve performance in some situations.We can take it lightly because lot of the normal safety of C# is lost so unmanaged code in C# and not in VB.NET.

So these are the some of most elegant differences between vb.net and c#.net that make them different.

ASP.NET: The Most Preferred Language for Web Development

ASP.NET (Active Server Pages.NET) is a standard programming language for website application development and more significantly for developing database-driven websites. ASP.NET was developed by Microsoft in the year 2002 with version 1.0 of the .NET Framework and is a fundamental part of Microsoft’s .NET framework vision. It is mainly used to create web pages and web technologies.

It is a full featured programming language and a valuable tool for programmers and developers which allow them to develop dynamic websites globally. With the help of ASP.NET, developers are able to build variety of applications such as custom software applications, mobile games, web applications, product development, ecommerce shopping carts, etc. Languages that support ASP.NET are C#, Visual Basic, and JavaScript.

ASP.NET is the most preferred language for developers is that very little code to write applications for the development of small and large. This development work, in addition to the long list of features provides a server-side programming model is to help some of the most favorable. Before you send to the browser, the server code with the code, instead of backup is to eventually provide additional security against theft of the code will run unwanted ASP.NET HTML code is sent.

ASP.NET pages can be written in easy, because the following reasons:

  • It provides source code and HTML together.
  • Source code is executed on server which provides power & flexibility.
  • Source code is compiled fast in the first request of page because server saves the compiled version for the next time.
  • Better security of application source code as it is not sent back to browser.
  • Security through continuous monitoring of pages, components and applications running on it by web server which automatically removes the illegal software, memory leaks, infinite loops, etc.

Since 2002, ASP.NET and Web upgrade version of the advanced features provided with the world of development is the introduction of five. Its latest version 3.5 Service Pack 2008 features, Visual Studio 2008 Service Pack 1 in the ASP.NET Dynamic Data, ASP.NET is, AJAX applications, to control the browser's history and a new name space system Launched in support of incorporation and release

Url Rewriting in Asp.net With Sample Project

URL rewriting is the process of intercepting an incoming Web request and automatically redirecting to another URL.

To understand completely?follow below link
http://msdn.microsoft.com/en-us/library/ms972974.aspx

I have a few minutes, to learn how to achieve URL rewriting, I'll be in a simple example, in this article.

I believe developer doesn’t have much time to read a complete article of 20 pages.

Here we go

Step 1
Create a table
(
POSTID INT,
TITLE VARCHAR(255),
BODY TEXT
)

CREATE TABLE TESTTABLE

Insert some dummy values

INSERT INTO TESTTABLE (POSTID,TITLE,BODY) VALUES (1,‘ACCORDIAN CONTROL WITH SQL SERVER’,
‘ACCORDIAN CONTROL WITH SQL SERVER CONNECTIVITY JOGGEE
MADE A ARTICLE AND THAT IS THE BEST I THINK SO.’)
GO
INSERT INTO TESTTABLE (POSTID,TITLE,BODY) VALUES (2,‘Mouse over effect’,
‘This is so simple and can found thousand places but I tried to make it more easier who
doesnt know the different between or anchor.’)
GO
?
SELECT * FROM TESTTABLE

STEP – 2
Create a stored procedure
Create PROCEDURE PROC_TEST
AS
BEGIN
SELECT
‘’ + TITLE + ‘’ AS ‘TITLE’,
BODY
FROM TESTTABLE
END

GO

Procedure for Detail Page.
CREATE PROCEDURE PROC_TESTDETAIL
@ID INT
AS
BEGIN
SELECT
POSTID,
TITLE,
BODY
FROM TESTTABLE
WHERE POSTID = @ID
END
GO

Database work is finished, let move to ASP.NET project means Website Programming.
Create a Website, Ajax Enabled or not its up to you, No matter what you choose.

In the default Web page to write the following code. I pasted the complete code for the default page. Where do I direct use of DataList, there are two areas of binding.

In a Code Behind Past below code.

Imports System.Data
Imports System.Data.SqlClientPartial Class _Default
Inherits System.Web.UI.PageProtected Sub Page_Load (ByVal sender as object, e ByVal As System.EventArgs) Me Handles

Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me .Load
If IsPostBack = False Then
Dim sqlConn As New SqlConnection
Dim sqlCmd As New SqlCommand(“PROC_TEST”, sqlConn)
Dim objDA As New SqlDataAdapter
Dim DT As New DataTable
‘******************************************************************************************************
‘I have mentioned this connection string in the web.config Change it with appropriate values.

‘****************************************************************************************************************
sqlConn.ConnectionString = ConfigurationManager.ConnectionStrings ( "connString's"). The ConnectionString
‘opening a connection
sqlConn.Open()
sqlCmd.Connection = sqlConn
sqlCmd.CommandType = CommandType.StoredProcedure
objDA.SelectCommand = sqlCmd
‘populate data table
objDA.Fill(DT)
‘bind data
DataList1.DataSource = DT.DefaultView
DataList1.DataBind()
‘disposing all the declared objects.
objDA.Dispose()
objDA = Nothing
sqlConn.Close()
sqlConn = Nothing
sqlCmd.Dispose()
sqlCmd.Connection.Close()
sqlCmd = Nothing
End If
End Sub
End Class??

Code for Detail WebPage.?

Create a folder named

In a Code Behind Just Copy Paste
Imports System.Data
Imports System.Data.SqlClient?

Partial?Class Detail_Default
Inherits?System.Web.UI.Page

?Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not IsPostBack Then?

?Dim sqlConn As New SqlConnection

?Dim sqlCmd As New SqlCommand(“PROC_TESTDETAIL” , sqlConn)
Dim objDA As New SqlDataAdapter

?Dim DT As New DataTable

‘Here you can specify your connection string.

?sqlConn.ConnectionString = ConfigurationManager.ConnectionStrings(

“connString” ).ConnectionString

‘opening a connection

sqlConn.Open()

sqlCmd.Connection = sqlConnsqlCmd.CommandType = CommandType.StoredProcedure

sqlCmd.Parameters.Add(“@ID”, SqlDbType.Int).Value = Request.QueryString(“ID” )
objDA.SelectCommand = sqlCmd

‘populate data table

objDA.Fill(DT)

‘bind data

lblTitle.Text = DT.Rows(0)(“Title” )?

txtBody.Text = DT.Rows(0)(“Body” )?

‘disposing all the declared objects.

objDA.Dispose()

objDA =Nothing

sqlConn.Close()

sqlConn =Nothing?

sqlCmd.Dispose()

sqlCmd.Connection.Close()?

sqlCmd =Nothing

End If
End Sub
End?Class

Add Global.asax file in the project on the root

??? Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
??????? ‘ Code that runs on application startup
??? End Sub
??? Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
??????? ‘ Code that runs on application shutdown
??? End Sub
??? Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
??????? ‘ Code that runs when an unhandled error occurs
??? End Sub
??? Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
??????? ‘ Code that runs when a new session is started
??? End Sub
??? Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
??????? ‘ Code that runs when a session ends.
‘ Note: The Session_End event is raised only when the
‘ sessionstate mode
‘ is set to InProc in the Web.config file. If session
‘mode is set to StateServer?
?‘ or SQLServer, the event is not raised.
??? End Sub

?Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
??? Dim Old As String
??? Dim MovingPath As String
??? Dim IncomingURL As HttpContext
??? Dim StartingIndex As Integer
??? Dim ID As String
IncomingURL = HttpContext.Current
Old = IncomingURL.Request.Path
‘here you can filtered with if condition if you don’t
?want any directory to be caught and redirected some where
? If Regex.IsMatch(Old, “/Detail/”) Then
????? Old = Old.Replace(“.ASPX”, “”)
????? StartingIndex = Old.IndexOf(“~”)
????? ID = Old.Remove(0, StartingIndex + 1)
????? MovingPath = “~/Detail/Default.aspx?id=” + ID.ToString
????? IncomingURL.RewritePath(MovingPath)
? End If
End Sub

In a web.config Add this key


Detail Page

?

.

?For complete article Please visit : http://blog.joggee.com/?p=182

4 Reasons Why ASP.NET is Better Than ASP Classic

Asp.net greater than ASP Classic. There are four key areas that make ASP.NET a much better choice for developers. These four areas include: stability, performance, scalability and language support.

#1 Stability

ASP is running under inetinfo.exe (IIS) process space, making it vulnerable to application crashes. This happens because the IIS must be stopped or restarted at regular intervals. The process is separate from inetinfo.exe ASP.Net, which means that they are not vulnerable to this type of application crashes. This means that the final product will be much more stable.

#2 Compilation

Classic ASP VBScript or JScript is interpreted to include runtime is on every page of a specific performance losses caused by line by line interpretation. The interpretation of the results pages, just in a certain inefficiency.

ASP.NET however compiles the code the first time it is accessed. The compiled code results in .NET classes housed within assemblies and allow subsequent page requests to be serviced with previously compiled code. ASP.NET therefore inherently provides a more secure and largely efficient rendering model by incorporating compilation and specifically the reuse of the compiled code. This ultimately means a better experience for the end user.

#3 Scalability

Classic applications with ASP, components used by pages that are quite difficult to update, maintenance or replacement. In general information component in service implementation will require the closure of services IIS, replace the item, and then restart the IIS.

ASP.NET was built to provide specific enhancements that allow scalable and efficient application updating. The ‘xcopy’ deployment model of .NET allows replacement of pages and components in real time and does not require a restart of the web server. If an update needs to be made to a current production application, developers can simply make the change and the infrastructure can account for that change the next time a request is made to the altered page or component. This means that content updates, fixes and enhancements to ASP.NET applications can be made in real time with little to no impact to the user base.

#4 Language Support

ASP.NET supports full server side programming languages and not just scripting languages. Only VBScript and Javascript are available for scripting in ASP Classic where as, in ASP.NET there are no such restrictions. With ASP.NET several programming languages like C# and VB.NET are available to program in accordance to the developers preference where both of them can even be used in the same application. The benefits of using server side programming languages can be seen in the previously mentioned compilation of code and the fact that rich control sets and complex frameworks are available to applications. In summary, the language support of ASP.NET allows for the development of robust, feature rich applications with deep programmatic support.

ASP.NET for programmers, so that they can provide better products to end-users greater flexibility. There are many custom programming company specializing in ASP.NET for Web applications, desktop applications, and even mobile types of applications.