Knowledge Transfer

Monday, December 29, 2008

Difference between StringBuilder and String.Concat method in C#.Net

Hi DotNetGems,

StringBuilder Namespace : System.Text.StringBuilder (Mutable)
String Namespace : System.String (Imutable)

Now Both String.Concat(),Fromat(),join() Methods are Concating the string values to another string value but why C#.Net Introduce the StringBuilder Class???????????
.
.
.
Difference between StringBuilder and String?
Difference between mutable and Immutable?

How String Concatenation String Builder Append affects performance

Most of us have used String concatenation in our projects, Have we ever given a thought to what goes on behind while concatenating the strings?

There is a major flaw in using string concatenation as against the String builders append concerning performance only.
Except for performance and memory management both are same and give us the same desired output.

How they work
Lets take a look at how the things work when we concatenate strings

lets take a case where we are concatenating 2 strings and assigning the output to a 1st string

outputString += secondString;

In the above case, each instance of the string is created and assigned hence

in total we will have 3 instances of the strings!! Surprised?? well thats how strings concatenation works

It will create a new string outputString,with both old outputString and secondString

String objects in .net are immutable. Once the string has been created, the value can’t be changed. When you type
outputString = outputString + secondString;
you actually discard the old outputString and create a new string object containing the result of the concatenation. When repeated several times, you end up constructing many temporary string objects.

now just imagine the case where you have n number of strings you have to concatenate how many string objects will be created wont that be a waste of time ??? Creating a string object assigning it some value then again creating a string object and so on …..

Imagine the impact on the performance of the application!!!!

Now lets see how String builder works

Using a string builder you will have


System.Text.StringBuilder outputString = new System.Text.StringBuilder();

outputString.Append(secondString);

StringBuilder, is a mutable string hence in this case we just have 1 instance of outputString and the second string is appended into that existing instance
no other instance is created hence the process is efficient and fast.

Note :- The point to remember here is that using StringBuilder for a concatenation of 2-3 strings doesnt make a significant difference in the performance but when you have numerous strings then the usage of StringBuilder has a big positive Impact on the performance

Labels: , , , , , ,

Happy New Year - 2009

Hi DotNetGems,
Wish You a Happy New Year -2009



All The Best,
Uday.Adidham

Labels: , , , , , , , , , , , , , ,

Monday, December 22, 2008

Happy holidays,Happy Chirstmas,Happy New Year,2009

Hi DotNetGems,



Happy New Year and Happy Holidays

Uday.Adidham

Labels: , , , , , ,

Condolences to PV Narashimha Rao (Prime minister 21-JUN-1991 to 16 may 1996)

Sorry DotNetGems...

Sorry for upload irelevent stuff to my Bolg.But i am happy about to upload good stuff for our former 12th Primeminister Mr.P.V.Narashimaha Rao(18th JUN 1921 to 23 DEC 2004).i hope we all appriciate this post and give comment about this.Please remember our Indian Real Heros.Today Mr.PV s 4th Death Anniversary..please Condoleance to PV.




Johar PV Narshimha Rao.

Labels: , , ,

Sunday, December 21, 2008

ASP.Net Page LifeCycle ,LifeCycle


Here i am explain the asp.net page lifecycle.Please Click on the images for Enlarge....






Happy Coding
Uday.Adidham

Labels: , , ,

Thursday, December 18, 2008

How to Access Network Files using asp.net?

Here I am Showing How to Access Network Files and Folder using asp.net

When we Develop web application to dealing with Files and folders, at that time our web server is not quite capable to manage files and folder, so in this scenario we can use two different server to manage application properly, so we need Web Server to host our web application and File Server to manage files and folder.

To implement that scenario In Web application, there are so many ways to do that. Here I am showing it using Synchronize the IUSR account between the two machines. We can do using Asp.net Impersonate. We can implement asp.net impersonate in different way, mean by programmatically or using web.config file

For More Stuff please Click this link
http://www.codeproject.com/KB/aspnet/UNC__Access_Network_file.aspx

Happy Coding
Uday.Adidham

Labels: , , , , , , ,

Wednesday, December 17, 2008

Using Params Keyword in C#.Net

Sometimes we may require a variable number of arguments to be passed to a function. For example we may require a sum function which calculates the total of the numbers passed to it no matter how many numbers are passed.

In C# we can use the Params keyword and pass variable no of arguments to a function. It's much like using ParamArray in VisualBasic language. The syntax of params arguments is:
params datatype[] argument name

Note that the argument passed using params argument should be an single dimension array also it should be the last argument in the argument list for the function.

The params parmeter can then be accessed as an normal array.

Example

class ParamsTest
{
static void Main()
{
System.Console.WriteLine(sum(2,3,4)); // Three Arguments Passed
System.Console.WriteLine(sum(10,20,30,40,50,60));//Six Arguments
}
static int sum(params int[] num)
{
int tot=0;
foreach(int i in num)
{
tot=tot+i;
}
return tot;
}
}

Happy coding,
Uday.Adidham

Labels: , , , , ,

Using Params Keyword in C#.Net

Sometimes we may require a variable number of arguments to be passed to a function. For example we may require a sum function which calculates the total of the numbers passed to it no matter how many numbers are passed.

In C# we can use the Params keyword and pass variable no of arguments to a function. It's much like using ParamArray in VisualBasic language. The syntax of params arguments is:
params datatype[] argument name

Note that the argument passed using params argument should be an single dimension array also it should be the last argument in the argument list for the function.

The params parmeter can then be accessed as an normal array.

Example

class ParamsTest
{
static void Main()
{
System.Console.WriteLine(sum(2,3,4)); // Three Arguments Passed
System.Console.WriteLine(sum(10,20,30,40,50,60));//Six Arguments
}
static int sum(params int[] num)
{
int tot=0;
foreach(int i in num)
{
tot=tot+i;
}
return tot;
}
}

Happy coding,
Uday.Adidham

Labels: , , , , ,

Good website for all asp.net,c#.net Codes and articles,Faq's and interview questions?

The below site describes the all the good concepts for asp.net,c#.net,vb.net and sql server and comarsion about the .net and java technologies .tips and tracks avilable...

Click Here

Happy Coding,
Uday.Adidham

How to disable the Cookies in one web pages with in the project? and session in asp.net ?

i have posted two sample IMP questions for cookies and sessions

How to disable the Cookies in one web pages with in the project?
Using request.Cookies.discard

How to disable the session in one web page with in the project?

session state management in ASP.NET requires overhead. So, if a particular page will not be accessing the Session object, developers can set the EnableSessionState attribute of the Page directive for that page to False. If a particular page will be accessing the Session object and not altering the value of the session, then set the EnableSessionState attribute of the Page directive for that page to Readonly. Session state can be disabled for an entire site by setting the mode attribute of the sessionState element to Off in the Web.config.

Happy Coding,
Uday.adidham

Labels: , , ,

Monday, December 15, 2008

what is Response.redirect(URL,Bollean value(True/false)) .

We are very frequently using the response.redirect(url) in our asp.net application for redirecting the pages from one page to another page.With in response.redirect(url,[true/false]) one more paramets in that function that is Bollean value parameters. why i am using that Boolean value in response.redirect() method.i think all of know about the Response.redirect() and server.tranfer and server.execute() methods.i skip that introducation and Prons and cons and bla ..bla...

::now i am discuss the resposne.redirect(url,[true/false])::

Since the advent of Server.Transfer(url) I've used Response.Redirect(url) less and less, but for those times when you want the client to know of the location from where information will be retrieved it's still your best option. So you use it, never expecting that the simple call you've used for years with ASP would throw an exception in ASP.NET.

The ThreadAbortException is thrown when you make a call to Response.Redirect(url) because the system aborts processing of the current web page thread after it sends the redirect to the response stream. Response.Redirect(url) actually makes a call to Response.End() internally, and it's Response.End() that calls Thread.Abort() which bubbles up the stack to end the thread. Under rare circumstances the call to Response.End() actually doesn't call Thread.Abort(), but instead calls HttpApplication.CompleteRequest(). (See this Microsoft Support article for details and a hint at the solution.)

Though one could argue the logic behind throwing this exception in the first place, there are a couple of ways to get around this.

The try-catch block

try
{
Response.Redirect(url);
}
catch (ThreadAbortException ex)
{
}
The first solution, and the most common one found in an internet search, is to simply wrap the call to Response.Redirect in a try-catch block. Although it appears to work I don't like it for two reasons:

Processing an exception can be costly and messy
The rest of the page and event chain continues to execute
Since the exception is caught the page continues to execute through it's event chain which takes up unnecessary CPU resources and potentially sends unwanted data to the client (which will be ignored since the client received a redirect).

A better way.

Since the real culprit is the call to Thread.Abort(), how can we Redirect the page without making that call? We would have to tell the client to redirect without calling Response.End() of course, and it turns out that there is an overload method of Response.Redirect() that will do exactly that.

Response.Redirect(string url, bool endResponse);
In this overload the second parameter tells the system whether to make the internal call to Response.End() or not. When this parameter is false the client is sent the redirect url, but the internal call to Response.End is skipped. This completely avoids the code that would throw the exception, but the cost is that this thread doesn't stop executing the Application events! Thankfully we can solve that problem also by duplicating the step that Response.End() takes under those rare circumstances, namely calling the HttpApplication.CompleteRequest() method.

HttpApplication.CompleteRequest() sets a variable that causes the thread to skip past most of the events in the HttpApplication event pipeline and go straight to the final event, named HttpApplication.EventEndRequest. This gracefully ends execution of the thread with a minumum of server resources.

Alain Renon pointed out to me on Gabriel Lozano-Morán's blog that the page still sends the rendered HTML to the client. He's absolutely right. In fact, Page events still execute and the Page still processes postback events too. The event pipeline that I am talking about short circuiting with the call to HttpApplication.CompleteRequest() is not the Page event chain but the Application event chain. The Application event chain currently consists of the following events as of .NET 2.0:

ValidatePathExecutionStep
UrlMappingsExecutionStep
EventBeginRequest
EventAuthenticateRequest
EventDefaultAuthentication
EventPostAuthenticateRequest
EventAuthorizeRequest
EventPostAuthorizeRequest
EventResolveRequestCache
EventPostResolveRequestCache
MapHandlerExecutionStep
EventPostMapRequestHandler
EventAcquireRequestState
EventPostAcquireRequestState
EventPreRequestHandlerExecute
CallHandlerExecutionStep
EventPostRequestHandlerExecute
EventReleaseRequestState
EventPostReleaseRequestState
CallFilterExecutionStep
EventUpdateRequestCache
EventPostUpdateRequestCache
EventEndRequest

I've bolded CallHandlerExecutionStep because that is the step where all of the Page events take place. If you make a call to HttpApplication.CompleteRequest() from a Page event such as Page_Load then the Page events still process to completion, but all the Application events between CallHandlerExecutionStep and EventEndRequest are skipped and the thread ends gracefully.

One could argue that it doesn't matter so much that the page is still rendered since the client ignores it anyway, but Alain is correct that it does render, and that's not as efficient as we could make it. Also, if you have any PostBack processing (such as OnCommand Page event handlers) those will process and you may not want that either, but never fear there is an easy solution to both of those problems as well.

PostBack and Render Solutions? Overrides.

The idea is to create a class level variable that flags if the Page should terminate and then check the variable prior to processing your events or rendering your page. This flag should be set after the call to HttpApplication.CompleteRequest(). You can place the check for this value in every PostBack event or rendering block but that can be tedious and prone to errors, so I would recommend just overriding the RaisePostBackEvent and Render methods as in the code sample below:

private bool m_bIsTerminating = false;

protected void Page_Load(object sender, EventArgs e)
{
if (WeNeedToRedirect == true)
{
Response.Redirect(url, false);
HttpContext.Current.ApplicationInstance.CompleteRequest();
m_bIsTerminating = true;
// remember to end the method here if
// there is more code in it
return;
}
}

protected override void RaisePostBackEvent(IPostBackEventHandler sourceControl, string eventArgument)
{
if (m_bIsTerminating == false)
base.RaisePostBackEvent(sourceControl, eventArgument);
}

protected override void Render(HtmlTextWriter writer)
{
if (m_bIsTerminating == false)

base.Render(writer);
}
The Final Analysis

Initially I had recommended that you should simply replace all of your calls to Response.Redirect(url) with the Response.Redirect(url, false) and CompleteRequest() calls, but if you want to avoid postback processing and html rendering you'll need to add the overrides as well. From my recent in depth analysis of the code I can see that the most efficient way to redirect and end processing is to use the Response.Redirect(url) method and let the thread be aborted all the way up the stack, but if this exception is causing you grief as it does in many circumstances then the solution here is the next best thing.

It should also be noted that the Server.Transfer() method suffers from the same issue since it calls Response.End() internally. The good news is that it can be solved in the same way by using the solution above and replacing the call to Response.Redirect() with Server.Execute().

Happy coding!

Labels: , , ,

how to display and retrive the two tables data into two datagirds in ado.net

For example i have one storedprocedure(name : Sp_myprocedure) then

::sp_myprocedure::

Create procedure sp_myprocedure as
begin
select * from table1
select * from table2
end

Then how to call this stored procedure and display the two tables(table1,table2) data into two data grids.

ok....Understood...if understood u got answer ..otherwise

i am leaving some code to readers like data conception,data adapter and dataset initlizations...

take two data grids ,
dg1.datasource = ds.tables[0]
dg2.datasource = ds.tables[1]

Happy ADO.NET,
Uday.Adidham

This article explains to fill a AutoComplete Textbox from the data fetched from database in AJAX

Everyone knows about the AutoComplete Textbox. It is an ASP.NET AJAX extender that can be attached to any TextBox control. When the user types some letters in the Textbox, a popup panel will come to action and displayed the related words. So that the user can choose exact word from the popup panel. Here I tried to explain how this AutoComplete fetches data from the database through a Webservice.

Open Microsoft Visual Studio, click on New Website. Then choose ASP.NET Ajax Enabled Website and change the location to point your http://localhost/AutoComplete folder. Obviously, Default.aspx is added to your solution explorer.

Now drag and drop a Textbox from your Toolbox. Then drag and drop a ScriptManager and AutoCompleteExtender to your Default.aspx page. Then add a webservice to your project as WebService.asmx. First thing you have to do is to add the ScriptService reference to the webserive as follows.
[System.Web.Script.Services.ScriptService]


Now, write a webmethod ‘GetCountryInfo’ to fetch the data from the country table as follows

[WebMethod]
public string[] GetCountryInfo(string prefixText)
{
int count = 10;
string sql = "Select * from Country Where Country_Name like @prefixText";
SqlDataAdapter da = new SqlDataAdapter(sql,”Your Connection String Comes Here”));
da.SelectCommand.Parameters.Add("@prefixText", SqlDbType.VarChar, 50).Value = prefixText+ "%";
DataTable dt = new DataTable();
da.Fill(dt);
string[] items = new string[dt.Rows.Count];
int i = 0;
foreach (DataRow dr in dt.Rows)
{
items.SetValue(dr["Country_Name"].ToString(),i);
i++;
}
return items;
}


The above webmethod takes prefixText as argument, sends it to the query to fetch only the related words that starts with the prefixText values. Then it returns the result as an array of strings.

Next, in the Default.aspx page, set the AutoCompleteExtender’s TargetControlID property to the TextBox Id. Now you can see a new Extenders Tab is added in the Textbox’s Property window. Set ServicePath as WebService.asmx, ServiceMethod as GetCountryInfo and MinimimPrefixLength as 1.




Now, its time to run the project. Select the Default.aspx and click on View in Browser. You can see the excellent application starts to run. Type your country’s first letter. See all the countries starts with that letter will appear in the popup.

Resource From Click Here Part-1
Click Here Part-2

Happy AJAX,
Uday.Adidham

Labels: , , ,

Thursday, December 11, 2008

How can i include both C# and vb.net classes in same

1)How can i include both C# and vb.net classes in same
solution?

It is possible,In app-Code folder create sub folders
named VB,CS(as you like) and clreate .vb class files in the
folder named VB and .cs class files in the CS folder.
Step 2:
Go to web.config file and mention the following

in web.config file ....

< compilation debug="false" >
< codesubdirectories >
< add directoryname="VB" >
< add directoryname="CS" >



-------------------
HappyCoding
Uday

Labels: , , ,

How can i include both C# and vb.net classes in same

1)How can i include both C# and vb.net classes in same
solution?

It is possible,In app-Code folder create sub folders
named VB,CS(as you like) and clreate .vb class files in the
folder named VB and .cs class files in the CS folder.
Step 2:
Go to web.config file and mention the following







-------------------

Labels: , , ,

How to Build ConnectionString at Run-Time/Dynamically in ADO.Net

SqlConnectionStringBuilder is a class that helps to create and manage connection strings at run-time. You can change any connection string setting through your code whenever and wherever you want.

Sample Code for SqlConnectionStringBuilder:

SqlConnectionStringBuilder cnbuilder = new SqlConnectionStringBuilder();

cnbuilder.DataSource = "MyServerName";
cnbuilder.ConnectTimeout = 1000;
cnbuilder.IntegratedSecurity = false;
cnbuilder.UserID = "sa";
cnbuilder.Password = "MyDBServerPassword";

Response.Write(cnbuilder.ConnectionString);


The above block of code, create a connectionstring based on the values you passed to the DataSource, UserId and Password fields. You can directly use this SqlConnectionStringBuilder object to open a connection as follows


SqlConnection cn = new SqlConnection(cnbuilder.ConnectionString);
cn.Open();

This link is for Creating Class file fire DataAccess Leayer not For Above Stuff.
Data Access layer


Labels: , , , , , , , , ,

How to Build ConnectionString at Run-Time/Dynamically in ADO.Net

SqlConnectionStringBuilder is a class that helps to create and manage connection strings at run-time. You can change any connection string setting through your code whenever and wherever you want.

Sample Code for SqlConnectionStringBuilder:

SqlConnectionStringBuilder cnbuilder = new SqlConnectionStringBuilder();

cnbuilder.DataSource = "MyServerName";
cnbuilder.ConnectTimeout = 1000;
cnbuilder.IntegratedSecurity = false;
cnbuilder.UserID = "sa";
cnbuilder.Password = "MyDBServerPassword";

Response.Write(cnbuilder.ConnectionString);


The above block of code, create a connectionstring based on the values you passed to the DataSource, UserId and Password fields. You can directly use this SqlConnectionStringBuilder object to open a connection as follows


SqlConnection cn = new SqlConnection(cnbuilder.ConnectionString);
cn.Open();


Labels: , , , , , , , , ,

Wednesday, December 10, 2008

Good site for all .Net interview Questions in C3.net,vb.,net,sql server

These all topics avialbe in the below link..this is good site for all C#.net and asp.net people...

.NET Framework
Algorithms and Data Structures
C# Programming
Debugging
Design Patterns
Input / Output
Network and Internet
Performance
Programming Concepts
SQL Server
Visual Studio
Windows Forms
Latest Articles
Visual Studio Go To Definition Command
C# Iterators
Adapter Design Pattern
Adding Assemblies to the Global Assembly Cache
Checking Scroll Lock Status
SQL Server Indexes Part 2
Generating Temporary Files
C# Friend Assemblies
Visual Studio 2008 Transparent Intellisense
C# Static Classes

Please Click here Please Click Here

Happy Research

These all topics avialbe in the below link..this is good site for all C#.net and asp.net people...

.NET Framework
Algorithms and Data Structures
C# Programming
Debugging
Design Patterns
Input / Output
Network and Internet
Performance
Programming Concepts
SQL Server
Visual Studio
Windows Forms
Latest Articles
Visual Studio Go To Definition Command
C# Iterators
Adapter Design Pattern
Adding Assemblies to the Global Assembly Cache
Checking Scroll Lock Status
SQL Server Indexes Part 2
Generating Temporary Files
C# Friend Assemblies
Visual Studio 2008 Transparent Intellisense
C# Static Classes

Please Click here Please Click Here

Happy Research

Tuesday, December 9, 2008

Interview Questions on asp.net,c#.net,webservices and ajax nad xml For all companies

Hi Dotnet Developers and Fresher

i have place the link for .net applications Interviews Questions and FAQS about all the concepts in asp.net,c#.Net,vb.net,web services,windows services,remotinmg and ajax and XML and etc...etc....

please click here for finding the FAQ's
Please Click Here

Happy Interview,

Labels: , , , , ,

Multilevel Nested Master/Detail Data Display Using GridView

This article presents how the GridView control can be nested to show master/detail relationships for multilevel hierarchal data. In this article, I have implemented it for three levels, and it can be implemented for n levels quite easily, by maintaining the information about the edit index of the parent GridView controls.

This article provides a simple, easy, and clean solution for displaying data with multilevel master/detail relationships. This article also shows how the GridView can be used effectively by using its template fields, and how controls inside template fields are accessed and bound. More importantly, you will realize the power of GridView's edit mode, and learn how it can be used to do things other than editing; evading from its default usage!!

parent and Child relation in Gridview in asp.net 2.0

Please Click here about more stuff Multilevel Nested Master/Detail Data Display Using GridView

Happy Coding,

Labels: , ,

Friday, December 5, 2008

i3-soft Interview Questions,Hyderabad,Ameerpet

Hi,Recently in I3-Soft Interview questions,Ameerpet,Hyderabad

Sqlserver
---------
* - How to create Clustured index explicitly
* - Avoiding to create clustured index in table..wt conditions are u used
* - Diff b/w Stored procedures and UDF
* - Describe Trigger and types
* - Cursors
* - describe Clustred and Nonclustered indexes
* - Sqlserver view
* - locking in sqlserver
* - Is we call UDF in application If yes how?
ASP.Net
--------
Event bubbling
view state
caching -sqlcache dependency
Passing dynamic values to another page
C#
----------
Abstract and Interface
Value type and Reference type and examples
Is class extends multiple interfaces
Boxing and Unboxing
use of Virtual keyword
Assemblies

Happy Coding

Labels: , , ,

Thursday, December 4, 2008

Dot Net Certification Details: Microsoft MCTS(70-528, 70-536), MCP , MCPD (70-547), MCSE, MVP AND MCSD

Microsoft certification exams are very confusing. Every aspirant has to search a lot to demystified the best exams etc. Here in next few paragraph i am going to demystify Microsoft Certfication in .net.
In .net Microsoft offers following categories

* MCTS
* MCPD
* MCSD
* MCP
* MVP

MCTS - The Microsoft Certified Technology Specialist. This is the fresh exam and do not require any previous exams to clear it. So a new developer can start from this exam.

Following are the specialization and exams under those

.NET Framework 2.0 Web Applications

one has to pass the following examinations:

* Exam 70–536: TS: Microsoft .NET Framework 2.0 - Application Development Foundation

* Exam 70–528: TS: Microsoft .NET Framework 2.0 - Web-Based Client Development

.NET Framework 2.0 Windows Applications

one has to pass the following examinations:

* Exam 70–536: TS: Microsoft .NET Framework 2.0 - Application Development Foundation

* Exam 70-526: TS: Microsoft .NET Framework 2.0 – Windows-Based Client Development

.NET Framework 2.0 Distributed Applications
one has to pass the following examinations:

* Exam 70–536: TS: Microsoft .NET Framework 2.0 - Application Development Foundation

* Exam 70–529: TS: Microsoft .NET Framework 2.0 – Distributed Application Development
--------------------------------------------------------------------------------------------

MCPD -Microsoft Certified Professional Developer

this is next step to the MCTS, so to clear it you firstly need to have MCTS in your tally
Folloings are .NET 2.0, Visual Studio 2005 and SQL Server 2005.

Professional Developer: Web Developer
* Prerequisite: MCTS: .NET Framework 2.0 Web Applications
* Exam 70-547: PRO: Designing and Developing Web Applications by Using the Microsoft .NET Framework

Professional Developer: Windows Developer
Following examinations:

* Prerequisite: MCTS: .NET Framework 2.0 Windows Applications
* Exam 70–548: PRO: Designing and Developing Windows Applications by Using the Microsoft .NET Framework

Professional Developer: Enterprise Applications Developer
Following examinations:

* Prerequisite: MCTS: .NET Framework 2.0 Web Applications
* Prerequisite: MCTS: .NET Framework 2.0 Windows Applications
* Prerequisite: MCTS: .NET Framework 2.0 Distributed Applications
* Exam 70–549: PRO: Designing and Developing Enterprise Applications by Using the Microsoft .NET Framework

MCP Microsoft Certified Professional. Person having any ms certification is called MCP

MVP Microsoft Most Valuable Professional. This does not require any exam. It is related with how you contributed in the microsoft communties or any site that promote ms technologies. You could be MVP of any of the these c#,asp.net,web services,word,excel,

For more Information Click this link Click Here

Happy All the best,

Labels: , , , , , , , , ,

Wednesday, November 26, 2008

how to read and write XML Files in asp.net 2.0 (update,delte,insert and clear the XML files in asp.net)

Microsoft .NET introduces a new suite of XML APIs built on industry standards such as DOM, XPath, XSD, and XSLT. The .NET Framework XML classes also offer convenience, better performance, and a more familiar programming model, tightly coupled with the new .NET data access APIs—ADO .NET. XmlWriter, XmlReader, and XmlNavigator classes and classes that derive from them, including XMLTextReader and XMLTextWriter, encapsulate a number of functionalities that previously had to be accomplished manually. This tutorial will show you a sample of how to operate XML in ASP.NET and VB.NET.

The System.Xml namespace contains the XmlDocument Class .we can use this class to operate xml file.

Please Click here for more Information

Labels: , , , , ,

Thursday, November 20, 2008

Telugu Font

telugu chat ,translation,for asp.net

http://www.google.co.in/transliterate/indic/Telugu#

happy coding

Working with Web Services Using ASP.NET

XML Web Services provide a simple technique for accessing a method on an object that is running on a local or remote computer. Web Services can be accessed by an application written in any language and running on any operating system. They utilize HTTP as the underlying transport, which allows function requests to pass through corporate firewalls (as they move through port 80). In ASP.NET we can write a Web Service as simple as a normal business object and the only difference is that the functions are preceded with a special attribute that makes them as Web Services. Typical implementation of Web Services might include shipment tracking, credit card verification, searching for airfare rates, Weather forecasting, etc.

Click here for more info WEBSERVICES

if want some real time webservices to use in your application click here
3-rd party web services(http://www.xmethods.com/ve2/index.po)


Happy Coding

Faqs For Datagrid

How to implement smart paging in DataList control?

How to implement paging in DataList control?

How to apply custom formatting string to column values in GridView or DataGrid?

How to print grid data as PDF document?

Use AJAX with GridVies to show popup help messages

How to display BLOB images in GridView?

How to format data in GridView?

How to sort gridview and display image indicator in column header?

How to import CSV file into Grid?

How to highlight datagrid row? How to highlight gridview row? When mouse moves over the row.
How to access datagrid and gridview cell values on client side?

How to hide DataGrid Column? How to hide GridView Column?

How to raise server side event when datagrid and gridview row is selected?

How to highlight datagrid and gridview row when row is selected?

How to format GridView header? How to format DataGrid Header?

How to format GridView columns at run time?

How to set paging in GridView control - Simple usage at design time and runtime
setting of page size
How to format GridView rows at run time?

How to convert DataView To DataTable

Display Server User and Groups In DataGrid

How to add tool tips to ASP.Net DataGrid Headers

How to Format ASP.Net DataGrid Sorted Column Like Windows Explorer View

How to export ASP.Net DataGrid data to a CSV file

Embed ASP.Net DataGrid Inside Another DataGrid Control

Embed DataList Inside ASP.Net DataGrid Control

Simple use of DataGrid

Customize DataGrid Header

Customize DataGrid Items Appearance

Use AutoGenerateColumns attribute to control rendering of column

How to dynamically populate DropDownList

How to remove a column from DataGrid at runtime?

Conditional Formatting Of ASP.Net DataGrid Column

How to hide pager of a DataGrid Web Control at run time

Click here For Answers about that Questions Click Here

Labels: , , , , ,

Monday, November 10, 2008

XML Menu in asp.net 1.1 version

Horizontal Menu with XML File in ASP.Net 1.1 Version.reading the XML file and display like MENU.

Please click this link for xml menu stuff.

Click Here

Happy Coding

Friday, November 7, 2008

All tips in c#.Net and delegates,assembly,shared assembly,private assembly,remoting,generics,ADO.Net,

All tips in c#.Net and delegates,assembly,shared assembly,private assembly,remoting,generics,ADO.Net,


All C#.Net Examples and sql server examples

Happy coding

Labels: , , , , , ,

Thursday, September 25, 2008

Visual Studio Magazine for all c#.Net,asp.net and new technologies.

http://visualstudiomagazine.com/portals/portal.aspx?portal=67

Happy Coding

Labels: , ,

Creating Collapsible Detail Regions in a Repeater

Showing and Hiding Content Through Client-Side Actions.

Collapsible Repeater Controle Example Avialble here.

http://aspnet.4guysfromrolla.com/articles/091504-1.aspx

Happy Coding

Labels: , , , , ,

Working with Web Services Using ASP.NET

XML Web Services provide a simple technique for accessing a method on an object that is running on a local or remote computer. Web Services can be accessed by an application written in any language and running on any operating system. They utilize HTTP as the underlying transport, which allows function requests to pass through corporate firewalls (as they move through port 80). In ASP.NET we can write a Web Service as simple as a normal business object and the only difference is that the functions are preceded with a special attribute that makes them as Web Services. Typical implementation of Web Services might include shipment tracking, credit card verification, searching for airfare rates, Weather forecasting, etc.

http://aspalliance.com/979_Working_with_Web_Services_Using_ASPNET.all

Happy Coding

Wednesday, September 24, 2008

Modal window for asp.net with ajax

Introduction of AJAX Control Toolkit has opened many interesting possibilities for developing rich UI in ASP.NET. Add an awesome IDE like Visual Studio to it, and you can get astounding results without doing much.

In this article we will see how to enhance client side validators using AJAX Control Toolkit. Given below are screen shots of what we are trying to achieve. The whole purpose is to improve user experience with very little effort

http://ashishware.com/ASPValid.shtml

Thursday, September 18, 2008

What's New in C# 3.0

On the heels of the Visual Studio 2005 and C# 2.0 releases, Microsoft has given a sneak preview of what to expect in the version after the next: C# 3.0. Even though C# 3.0 is not even standardized yet, Microsoft provided a preview release at its Professional Developers Conference (PDC) in September so eager developers could try out some of the expected features. This article discusses the following major new enhancements expected in C# 3.0:

Implicitly typed local variables
Anonymous types
Extension methods
Object and collection initializers
Lambda expressions
Query expressions
Expression Trees


For More Click this linkhttp://www.developer.com/net/csharp/article.php/3561756

Happy coding

ABOUT INFRAGISTICS



As the world leader in user interface development tools, Infragistics empowers developers to build and style immersive user experiences and rich data visualization in line of business applications across all platforms — Windows Forms, WPF, ASP.NET, Silverlight and JSF.



We understand it isn't enough to make great products so we supply a range of value-added services including UI testing tools, support, training and consulting services.

http://www.infragistics.com/

Happy Coding

Tuesday, September 16, 2008

Threading in C#.Net

C# supports parallel execution of code through multithreading. A thread is an independent execution path, able to run simultaneously with other threads.

A C# program starts in a single thread created automatically by the CLR and operating system (the "main" thread), and is made multi-threaded by creating additional threads. Here's a simple example and its output:

http://www.albahari.com/threading/#_Introduction

Happy Coding

Tuesday, August 12, 2008

Asp.Net Menu Control Binding with XMLDataSource

This article explains the concept of building dynamic navigation control in web applications using Asp.Net Menu Control binding with XMLDataSource.

Asp.Net Menu Control Binding with XMLDataSource

Happy Coding

Thursday, May 22, 2008

Displaying Collapisble Data in GridView

Collapisble Data in Gridview in ASP.Net 2.0

http://www.codeproject.com/KB/aspnet/Collapsible_GridView_Data.aspx

Happy Coding.

Tuesday, May 20, 2008

A Simple Tooltip With Images and text in javascript ,CSS, HTML

Writing a tooltip is quite simple. This is a simple tooltip for our web pages with minimal code. Images, text and HTML code can be shown inside the tooltip.

First, we have to define a div which is our tooltip that we are going to use for our tooltip. Using a div will help us to show images, HTML code etc. inside a tooltip.

We can define the styles of the tooltip like transparency, font etc.

Once the tooltip div is OK, we have to add some attributes/events to the elements for which we are going to use this tooltip.



Click here for more info

A Simple Tooltip With Images and text in javascript ,CSS, HTML

Writing a tooltip is quite simple. This is a simple tooltip for our web pages with minimal code. Images, text and HTML code can be shown inside the tooltip.

First, we have to define a div which is our tooltip that we are going to use for our tooltip. Using a div will help us to show images, HTML code etc. inside a tooltip.

We can define the styles of the tooltip like transparency, font etc.

Once the tooltip div is OK, we have to add some attributes/events to the elements for which we are going to use this tooltip.



Click here for more info

Saturday, May 17, 2008

File Upload & Compression in ASP.Net

In this article I am going to look at how to upload a file to the web server and compress it using the compression methods provided in .Net. I will use the open source compression method to compress to a .gz file. The method is available in System.IO.Compression

File Uplaod and Compression Code

Happy coding

Monday, May 12, 2008

Backup the Database tables in sql server 2005

Backup the Database tables and Stored procedures in sql server 2005 and back up the tables with in intervel times.


http://www.exforsys.com/tutorials/sql-server-2005/sql-server-database-backup.html


Happy Coding...

Open the PDF File in ASP.Net

Read PDF File With in ASp.Net

private void ReadPdfFile()
{
string path = @"C:\uday.pdf";
WebClient client = new WebClient();
Byte[] buffer = client.DownloadData(path);

if (buffer != null)
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-length",buffer.Length.ToString());
Response.BinaryWrite(buffer);
}

}

Happy Coding

Create a scrollable Gridview in asp.net 2.0

This Code is For Scrollable Gridview.in this case the Header is Not moving only data will be moved like Excel Sheet.


http://www.codeproject.com/KB/aspnet/ScrollingGridView.aspx


Happy Coding,

Sunday, May 11, 2008

Session State Problem in ASP.Net

Q)i am creating one website. then i am using the Asp Session state in web.Config File... then

sqlConnectionString="data source=hi; user id=sa; password=sa; database=ASPState" cookieless="false" timeout="20" />

Whenever i am login into web page then One error is coming like this .....

Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.

How to slove this BUG....Plz Help

Answer----1)

Persisting Session Variables to SQLServer:
Using a state server lets all the servers in a Web farm share state information; however, that does not prevent state data from being lost if the state server crashes. You can persist state information and keep it accessible (even after a reboot) by storing the state data in a SQL Server database. To do that, modify the web.config file as follows:

mode="SQLServer"
sqlConnectionString=
"data source=127.0.0.1;user id=sa;password="
timeout="20"
/>

The sqlConnectionString attribute contains the IP address of the machine running SQL Server (127.0.0.1 in this case) as well as the user ID and password required to access the SQL Server.

Next, you need to set up the necessary database and tables to store the state information. Fortunately, ASP.NET provides an installation script to help you setup the database, ASPState, and its tables. To use the script, enter the following at a command prompt (you need to enter the following on a single line):


D:\WINNT\Microsoft.NET\Framework\v1.0.3328>
osql -S localhost -U sa -P installsqlstate.sql

The state information is actually stored in the tempdb database (not ASPState), in the ASPStateTempApplications and ASPStateTempSessions tables. The ASPState database contains several stored procedures that allow ASP.NET to perform housekeeping tasks, such as retrieving session variables and removing expired Session variables.

And Check if any Session Class Declared in ur Code Behind Code .. if u r create a Class Then Put [Serialazable] kayword

Answer----2)

pls visit the following link
http://msdn.microsoft.com/en-us/library/87069683(VS.71).aspx

if any Doubt plz wraite Comment

Wednesday, May 7, 2008

ASP.Net Tutorial For Learners

This is good site for learing and developing the projects



Happy coding

VS.Net 2008 Trail Version Download

Microsoft Visual Studio 2008 provides an industry-leading developer experience for Windows Vista, the 2007 Microsoft Office system, and the Web. In addition, it continues in the Microsoft tradition of development language innovation. To enable evaluation of Visual Studio 2008, this page provides links to trial editions of Visual Studio 2008. For more information, see Visual Studio 2008 Product Information.




Happy Coding

What is AJAX and Source code of AJAX and ToolKit

AJAX stands for Asynchronous JavaScript And XML.

AJAX is a type of programming made popular in 2005 by Google (with Google Suggest).

AJAX is not a new programming language, but a new way to use existing standards.

With AJAX you can create better, faster, and more user-friendly web applications.

AJAX is based on JavaScript and HTTP requests.

Know More With Below Link :



Happy coding

Tuesday, April 1, 2008

Working with ASP.NET Master Pages Programmatically,Master pages in asp.net 2.0

The Below link is Good For Master pages in asp.net 2.0 with Examples ...

1)Accessing members that are defined on the master page, which can consist of public properties and methods or controls.

2)Attaching master pages to a content page dynamically

3)Getting the Values of Controls on the Master Page

4)Attaching Master Pages Dynamically

CLICK HERE FOR MASTER PAGES

Happy Coding...

Monday, March 31, 2008

Sample Code For GridView in ASP.NET 2.0

In this article, you will learn how to work with the GridView control using the data from a Microsoft Access database. I will examine how to perform advanced tasks such as displaying, sorting, paging, updating and deleting data using one of the powerful controls included with Visual Studio 2005 in a step-by-step manner.

You cannot insert data into the database using the GridView control. However, you can do so by using the DetailsView and FormsView controls which ship with ASP.NET 2.0. I will discuss these controls in a forthcoming article. You should also note that the GridView control in ASP.NET 2.0 is a replacement to the popular DataGrid control in ASP.NET 1.1. As a primary requirement, you should have the latest build of Visual Studio 2005 in order to understand the steps explained in this article.


GRIDVIEW CONTROLE