background preloader

Dot Net Tips

Facebook Twitter

Consuming URL Shortening Services – bit.ly. هذه المقالة متوفرة أيضا باللغة العربية، اقرأها هنا. Read more about URL shortening services here. Source- Elsheimy.Samples.ShortenSvcs.zip Contents Contents of this article: Contents Overview Introduction API Overview Function Explanation Shortening Function Expanding Function Validation Function Stats Function Lookup Function Info Function Authentication Function Sample Where to go next Overview This is a very hot article that you can’t leave without checking it first. Today, we are going to talk about bit.ly API, its functions, and how you can access them from your .NET application. Don’t forget to download the sample code at the end of the article. Let’s go! Introduction Today we are going to talk about the most popular yet most powerful URL shortening service ever in the web. Of course this service is well-known enough and we don’t need to describe it or talk about its features, so we’ll dig into the API immediately.

Overview Functions: Input Arguments: Consuming a Json WebService from a C# or VB Application. Introduction Json has become a widespread data format in web applications, mainly with Ajax enriched web sites. Also "normal" Windows applications can communicate with such web services and consume Json data. I’ll show here a way to accomplish that, and some caveats. Background A short time ago, I started to learn how to use ReSTful we services. Naïve Approach Visual Studio allows us to add a reference to a web service. I checked with a web browser if I could get some meta-information from the server by adding a "? After a lot of research on Google, it turns out that the discovery using Web Services Description Language (^) is not common with ReSTful services. Step by Step What to do now after that failure?

Set up the URL with all parameters Send a GET WebRequest Receive the Json formatted data Deserialize the object(s) Do something useful with the received data Most of these steps do not cause any problems, it should look something like: But where do we find that Serializer? Json2csharp. Passing variables between pages using QueryString. Download demo project - 12.1 Kb Often you need to pass variable content between your html pages or aspx webforms in context of Asp.Net.

For example in first page you collect information about your client, her name and last name and use this information in your second page. For passing variables content between pages ASP.NET gives us several choices. One choice is using QueryString property of Request Object. This html addresses use QueryString property to pass values between pages. Webform2.aspx this is the page your browser will go. name=Atilla you send a name variable which is set to Atilla lastName=Ozgur you send a lastName variable which is set to Ozgur As you have guessed ? Put this code to your submit button event handler. private void btnSubmit_Click(object sender, System.EventArgs e) { Response.Redirect("Webform2.aspx? Our first code part builds a query string for your application and send contents of your textboxes to second page. Or. Using Returned XML with C# - Yahoo! Developer Network. Once you have retrieved data from a web service you will need to do something with it.

This HOWTO describes the various built-in methods .NET provides to use XML returned by a web service. Overview The .NET Framework provides excellent support for XML. Combined with the databinding support of WinForms and ASP.NET applications you have an easy and powerful set of tools. ASP.NET 2.0 takes databinding another step further by providing the DataSource control which lets you declaratively provide data access to data-bound UI controls. Returned Data to a String The simplest way to view the returned data is to get the response stream and put it into a string. C# String Sample Using XmlReader XmlReader provides fast forward-only access to XML data. With .NET 2.0 you should create XmlReader instances using the System.Xml.XmlReader.Create method. C# XmlReader Sample Using XmlDocument XmlDocument gives more flexibility and is a good choice if you need to navigate or modify the data via the DOM.

How to update a database from a DataSet object by using Visual C# 2005 or Visual C# .NET. This step-by-step article shows you how to take a DataSet that contains data (which is loaded from a database), how to modify that data, and then how to send it back to the database to update the original source. DataSet objects, a key part of data access in the Microsoft .NET Framework, are in-memory objects that can hold tables, views, and relationships. Requirements The following list outlines the recommended hardware, software, network infrastructure, and service packs that you need:Microsoft Windows Server 2003, Microsoft Windows 2000 Professional, Microsoft Windows 2000 Server, Microsoft Windows 2000 Advanced Server, or Microsoft Windows NT 4.0 ServerMicrosoft SQL Server version 7.0, Microsoft SQL Server 2000, or Microsoft Data Engine (MSDE) with the PUBS sample database installedMicrosoft Visual Studio 2005 or Microsoft Visual Studio .NETThis article assumes that you are familiar with the following topics: Database terminologyStructured Query Language (SQL) Complete code listing.

[Solved] Email Verification in asp.net.