Articles in the ASP.Net Category
ASP.Net, Tech Corner »
The wsdl (Web service description language) provides a model for describing the web service. We can build applications that consume the web service using just the wsdl. Creating a web service client to consume a web service with wsdl is relatively very easy compared to creating one in Java or any other language. It is worth remembering that a web service could be coded in any language and an application that consumes the web service can be in another language. For Example: My web service may be written in Java …
Read the full Post »ASP.Net, GridView Tips, Tech Corner »
Binding Images to a Gridview has been explained in this article. For this , first start a new application with ASP.NET and drop a GridView control onto the aspx page.Now add a new template Column to the GridView.In addition,if you want to display anything else, add bound fields or template fields according to your needs.In here, i have used a bound fied to display the image Id and the template field to display the Image.Now In the template field,add an Image control as the item template.For this just click on …
Read the full Post »ASP.Net, C# Codes, Tech Corner »
Here i will explain the binding of a treeview from the Database.This can be a tricky task since we may have to build a parent-child relationship here.So first thing you would need is a table in the database where we actually have the parent-child relationship.
An Example
Table Name: Category
CategoryId INT
CategoryName Varchar(50)
ParentCategoryId INT
NodeLevel INT
Suppose we have Data in the Table named Category as follows
1
Root
NULL
0
2
Child
1
1
3
Child2
1
1
4
grandChild
2
2
5
grandChild2
2
2
6
grandChild3
3
2
//
Now to bind this to the tree,we will use a recursive function.Also for better performance,we will bind the database results into a global DataTable first and then apply filtering.
Here is the Code …
ASP.Net, Tech Corner »
This is a very common error that is encountered.This is because Response.End ends the Page Execution and transfers the execution to Application_EndRequest event and the line following the Response.End is not executed.
This problem occurs for the Response.Redirect method also as when this method is used, an internal call to Response.End is made.
//
How to resolve it?
Instead of Response.End,use HttpContext.Current.ApplicationInstance.CompleteRequest method.
For Response.Redirect,set the endResponse parameter in the method to false.It indicates that the execution of the current page should not terminate.
Eg:
Response.Redirect(“~/Default.aspx”,false);
This error also happens when Server.Transfer method is called.Just use Server.Execute …
ASP.Net, Tech Corner »
THe Visual Studio 2010 Beta and the .Net Framework 4.0 were launched by Microsoft Corporation this week.With the launch comes many new features that will sure take applicatipn and web development to new heights.The basic structure still quite remains the same but still the product does come with many new exciting features.The changes have come mainly in the core services,Ajax,Web Forms etc.
//
The core services like Output caching and session state storage makes a significant improvement.One of these is the Web.Configminification.The introduction of new features meant that the web.config was …
Read the full Post »