Wednesday, July 30, 2008

How do I add a video unit to my page?

How do I add a video unit to my page?
How do I add a video unit to my page?
Once you have linked your YouTube account and AdSense account, it's easy to add a video unit to your page. Just follow these steps to customize and implement your player.
Sign in to your account at http://www.google.com/adsense.
Select the AdSense Setup tab, then choose video units as the product.
You'll be directed to the YouTube website to customize your video unit. If you're not already logged in to YouTube, you will need to do so, then visit this page.
Enter a name and description for this player that will help you remember it in the future.
Customize the colors and layout of the player to fit your site.
Choose the type of content you'd like to display in this player: automated content that's automatically targeted to your site, or content from specific categories or providers.
Click the Generate code button.
Copy the code in the box and paste into the HTML source of your page where you'd like to display the video.
Once you've saved and published your page to the web, you'll see targeted videos start to show up right away.

Tuesday, July 29, 2008

Email address validation using regular expression.

CodeProject: Email address validation using regular expression.. Free source code and programming help

Managing LINQ Data Contexts with the Unity Framework

CodeProject: Managing LINQ Data Contexts with the Unity Framework. Free source code and programming help

Adding DOC, RTF and OOXML Export Formats to the Microsoft Report Viewer Control

CodeProject: Adding DOC, RTF and OOXML Export Formats to the Microsoft Report Viewer Control. Free source code and programming help

A Very Easy to Use Excel XML Import-Export Library

CodeProject: A Very Easy to Use Excel XML Import-Export Library. Free source code and programming help: "A Very Easy to Use Excel XML Import-Export Library"

SqlLinq: Taking Linq to Sql in the Other Direction

CodeProject: SqlLinq: Taking Linq to Sql in the Other Direction. Free source code and programming help

Editing and Displaying Database Values through a DropDownList in GridView

CodeProject: Editing and Displaying Database Values through a DropDownList in GridView. Free source code and programming help

Integrating ASP.NET and ActionScript 3.0 through XML

CodeProject: Integrating ASP.NET and ActionScript 3.0 through XML. Free source code and programming help: "Integrating ASP.NET and ActionScript 3.0 through XML"

Persistent Splitter control in Visual WebGui

CodeProject: Persistent Splitter control in Visual WebGui. Free source code and programming help

Excecute SSIS package (DTSX) from ASP.Net

CodeProject: Excecute SSIS package (DTSX) from ASP.Net. Free source code and programming help

A Practical Example Of Using The New Features Of ASP.NET 3.5

CodeProject: A Practical Example Of Using The New Features Of ASP.NET 3.5. Free source code and programming help
Introduction
This tutorial doesn’t cover the theoretical basics of the new features and controls, instead it concentrates on the practical example of using the new features. This tutorial covers the following features:
LINQ (Language Integrated Query) for the data manipulations
ListView control for presenting the data
LinqDataSource for binding data
DataPager for pagination
ASP.NET AJAX for getting rid of the unncecesassary page reloads


WWW.VISLI.COM

Printing of DataGridView

CodeProject: Printing of DataGridView. Free source code and programming help
Introduction
Few days back, I had been working on an application, called Fee Management System, which used to take the fee details from the students and display the records on the basis of certain search criteria in a grid and then the fee collector could print the entire details in the form of a report. Although, it was not a tedious task, but the integration of printing with the application took most of the time. So, I thought to share my code with all the other developers who are working on the printing of datagridview.

Generate PDF Using C#

CodeProject: Generate PDF Using C#. Free source code and programming help
I must confess that I’m not a big fan of PDF. Still, it somehow manages to wiggle in almost every project I'm on – clients want to send out documents, Word is bounded to Windows, HTML is lame, PDF it is. Unfortunately, the situation with it and C# haven’t changed much in couple past years - if there were no new, fancy, priced components, I would conclude that it’s almost the same as it was in .NET 1.1 times – it is a pain to create PDFs.

Friday, July 25, 2008

SingingEels : AJAX Panels with ASP.NET MVC

SingingEels : AJAX Panels with ASP.NET MVC

ASP.NET MVC Preview 4 brought a bit of AJAX support, which is a natural fit for the MVC design pattern. This article will show how incredibly easy it is to create "lazy loading AJAX panels" with ASP.NET MVC.


www.visli.com

Thursday, July 24, 2008

OnRowDataBound gridview conditional formatting C#

How To Show Some Rows Differently in a GridView SimplyGold




protected void CustomerGrid_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
GridViewRow row = e.Row;

// Make sure we aren't in header/footer rows
if (row.DataItem == null)
{
return;
}

Customer customer = row.DataItem as Customer;

if (/* Do your conditionals here*/)
{
// Change Row formatting here OR
// Add new cells
// Or create an entirely different cells
}
}

www.visli.com

OnRowCreated="OnRowCreated"




protected void OnRowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView drv = e.Row.DataItem as DataRowView;
Object ob = drv["Weight"];
if (!Convert.IsDBNull(ob) )
{
double dVal = 0f;
if (Double.TryParse(ob.ToString(), out dVal))
{
if (dVal > 3f)
{
TableCell cell = e.Row.Cells[1];
cell.CssClass = "heavyrow";
cell.BackColor = System.Drawing.Color.Orange;
}
}
}
}
}

Wednesday, July 23, 2008

Alternating styles in ListView without AlternatingItemTemplate

Alternating styles in ListView without AlternatingItemTemplate - Tales from the Evil Empire: "Alternating styles in ListView without AlternatingItemTemplate"

DotNetBips.com :: Blossom your .NET skills

DotNetBips.com :: Blossom your .NET skills: "Using LINQ in ASP.NET (Part 2)"

Display Subtotal Header asp.net C# sql-server databse

Go to this article and code this code
Master-Detail Display using Nested Repeater Web Forms Control: "Master-Detail Display using Nested Repeater Web Forms Control"

change following lines.....

DataRelation rel = new DataRelation("CustOrdRel",ds.Tables["Customers"].Columns["CustomerID"],ds.Tables["Orders"].Columns["CustomerID"]);
.
.
.
.
((Repeater)e.Item.FindControl("RepOrders")).DataSource=( ( DataRowView ) e.Item.DataItem ).CreateChildView("CustOrdRel");
((Repeater)e.Item.FindControl("RepOrders")).DataBind();


www.visli.com

ADO.NET's DataRelation

Know Dot Net - ADO.NET's DataRelation Object
DataRelations(string, ParentDataColumn(), ChildDataColumn(), Boolean)


http://www.visli.com/

CreateChildView

DataRowView.CreateChildView Method ( String )

void getChildSource ( Object src, DataListItemEventArgs e ) {
if ( e.Item.ItemType == ListItemType.SelectedItem
e.Item.ItemType == ListItemType.AlternatingItem ) {
DataGrid childGrid = ( DataGrid ) e.Item.FindControl ( "Products" );
childGrid.DataSource = ( ( DataRowView ) e.Item.DataItem ).CreateChildView ( "categoryId" );
childGrid.DataBind ( );
}
}

www.visli.com

Tuesday, July 22, 2008

TINYINT Sql-server Value

The TINYINT data type is an exact numeric data type; its accuracy is preserved after arithmetic operations.
You can explicitly specify TINYINT as UNSIGNED, but the UNSIGNED modifier has no effect as the type is always unsigned.
The range for TINYINT values is 0 to 28 – 1, or 0 to 255.
In Embedded SQL, TINYINT columns should not be fetched into variables defined as char or unsigned char, since the result is an attempt to convert the value of the column to a string and then assign the first byte to the variable in the program. Instead, TINYINT columns should be fetched into 2-byte or 4-byte integer columns. Also, to send a TINYINT value to a database from an application written in C, the type of the C variable should be integer.

http://www.visli.com/

TINYINT Sql-server Value

The TINYINT data type is an exact numeric data type; its accuracy is preserved after arithmetic operations.
You can explicitly specify TINYINT as UNSIGNED, but the UNSIGNED modifier has no effect as the type is always unsigned.
The range for TINYINT values is 0 to 28 – 1, or 0 to 255.
In Embedded SQL, TINYINT columns should not be fetched into variables defined as char or unsigned char, since the result is an attempt to convert the value of the column to a string and then assign the first byte to the variable in the program. Instead, TINYINT columns should be fetched into 2-byte or 4-byte integer columns. Also, to send a TINYINT value to a database from an application written in C, the type of the C variable should be integer.

http://www.visli.com/

Pass Multiple Values from a GridView to Another Page using ASP.NET

.NET - Pass Multiple Values from a GridView to Another Page using ASP.NET
Abstract: A common requirement in our projects is to select a GridView row and pass multiple values of the selected row to another page. I recently got a request from a few readers who wanted an article on this. In this article, we will explore how simple it is to achieve this requirement.

Another DataGridView Printer

CodeProject: Another DataGridView Printer. Free source code and programming help

Convert SQL Server DB to SQLite DB

CodeProject: Convert SQL Server DB to SQLite DB. Free source code and programming help

C# Utility to automatically do the conversion from SQL Server DB to SQLite DB

How to Create an HTML Editor for ASP.NET AJAX

CodeProject: How to Create an HTML Editor for ASP.NET AJAX. Free source code and programming help

Using OleDb to Import Text Files (tab, CSV, custom)

CodeProject: Using OleDb to Import Text Files (tab, CSV, custom). Free source code and programming help

Generic List Sort Function

CodeProject: Generic List Sort Function. Free source code and programming help

Delegates, events and namespaces using C#

CodeProject: Delegates, events and namespaces using C#. Free source code and programming help

Automatically Starting your Application on Windows Mobile

CodeProject: Automatically Starting your Application on Windows Mobile. Free source code and programming help: "Automatically Starting your Application on Windows Mobile"

A GPS keep-alive utility and tester for Windows Mobile -

CodeProject: A GPS keep-alive utility and tester for Windows Mobile. Free source code and programming help

Managing LINQ Data Contexts with the Unity Framework

CodeProject: Managing LINQ Data Contexts with the Unity Framework. Free source code and programming help

How to create small and easily deployable MySql Database Application

CodeProject: How to create small and easily deployable MySql Database Application. Free source code and programming help

Dynamic Multiple Row Column Grid Header

CodeProject: Dynamic Multiple Row Column Grid Header. Free source code and programming help

Friday, July 18, 2008

response.redirect in Html

META HTTP-EQUIV="Refresh" CONTENT="1;
URL=http://www.visli.com/youtube.aspx?searchtxt=nit%20jamshedpur
put this code in head.

Required Field Validator C# Blanks Invalid

*

Thursday, July 17, 2008

DotNetBips.com :: Blossom your .NET skills

DotNetBips.com :: Blossom your .NET skills: "Using LINQ in ASP.NET (Part 1)"
Language INtegrated Query or LINQ changes the way you write your data driven applications. Previously developers used to think and code differently to access different data stores such as SQL server, XML files and in-memory collections. The new LINQ based programming can take away the hassles involved while developing such applications. In this multi part series I am going to explain how LINQ capabilities can be used ASP.NET applications.
Example
The LINQ way of development is best learnt with example. We will develop a simple data entry web form that performs INSERT, UPDATE, DELETE and SELECT operations on the Employees table of the Northwind database. All the operations happen via LINQ to SQL queries. Our development involves the following steps:
Create an entity class for Employees table
Create a strongly typed data context to expose the underlying tables
Develop a web form that makes use of LINQ to SQL capabilities to perform the required operations
http://www.dotnetbips.com/articles/56f8f29d-2617-4f99-a8b4-977703ebf780.aspx

Tuesday, July 15, 2008

Convert String to DateTime

p2p.wrox.com Forums - Convert String to DateTime

Login Time : Keep track of how much time your kids spend on the computer

CodeProject: Login Time : Keep track of how much time your kids spend on the computer. Free source code and programming help

How To Populate A DataGridView Control Using OleDbDataReader

CodeProject: How To Populate A DataGridView Control Using OleDbDataReader. Free source code and programming help

Simple introduction to Oracle XE with C#

CodeProject: Simple introduction to Oracle XE with C#. Free source code and programming help

Simple introduction to Oracle XE with C#

CodeProject: Simple introduction to Oracle XE with C#. Free source code and programming help

Cascading Deletes in LINQ to SQL

CodeProject: Cascading Deletes in LINQ to SQL. Free source code and programming help

This article will discuss alternative methods for performing cascading deletes using LINQ to SQL. Cascading delete refers to the action of removing records associated by a foreign key relationship to a record that is the target of a deletion action. LINQ to SQL does not specifically handle cascading deletes and it is up to the developer to determine whether or not that action is desired. It is also up to the developer to determine how to go about accomplishing the cascading delete.


www.visli.com

SQL Server Date Formats

SQL Server Helper - Tips and Tricks - Date Formats: "SQL Server Date Formats"


Mon DD YYYY 1HH:MIAM (or PM)
Default
SELECT CONVERT(VARCHAR(20), GETDATE(), 100)
Jan 1 2005 1:29PM 1
MM/DD/YY
USA
SELECT CONVERT(VARCHAR(8), GETDATE(), 1) AS [MM/DD/YY]
11/23/98
MM/DD/YYYY
USA
SELECT CONVERT(VARCHAR(10), GETDATE(), 101) AS [MM/DD/YYYY]
11/23/1998
YY.MM.DD
ANSI
SELECT CONVERT(VARCHAR(8), GETDATE(), 2) AS [YY.MM.DD]
72.01.01
YYYY.MM.DD
ANSI
SELECT CONVERT(VARCHAR(10), GETDATE(), 102) AS [YYYY.MM.DD]
1972.01.01
DD/MM/YY
British/French
SELECT CONVERT(VARCHAR(8), GETDATE(), 3) AS [DD/MM/YY]
19/02/72
DD/MM/YYYY
British/French
SELECT CONVERT(VARCHAR(10), GETDATE(), 103) AS [DD/MM/YYYY]
19/02/1972
DD.MM.YY
German
SELECT CONVERT(VARCHAR(8), GETDATE(), 4) AS [DD.MM.YY]
25.12.05
DD.MM.YYYY
German
SELECT CONVERT(VARCHAR(10), GETDATE(), 104) AS [DD.MM.YYYY]
25.12.2005
DD-MM-YY
Italian
SELECT CONVERT(VARCHAR(8), GETDATE(), 5) AS [DD-MM-YY]
24-01-98
DD-MM-YYYY
Italian
SELECT CONVERT(VARCHAR(10), GETDATE(), 105) AS [DD-MM-YYYY]
24-01-1998
DD Mon YY 1
-
SELECT CONVERT(VARCHAR(9), GETDATE(), 6) AS [DD MON YY]
04 Jul 06 1
DD Mon YYYY 1
-
SELECT CONVERT(VARCHAR(11), GETDATE(), 106) AS [DD MON YYYY]
04 Jul 2006 1
Mon DD, YY 1
-
SELECT CONVERT(VARCHAR(10), GETDATE(), 7) AS [Mon DD, YY]
Jan 24, 98 1
Mon DD, YYYY 1
-
SELECT CONVERT(VARCHAR(12), GETDATE(), 107) AS [Mon DD, YYYY]
Jan 24, 1998 1
HH:MM:SS
-
SELECT CONVERT(VARCHAR(8), GETDATE(), 108)
03:24:53
Mon DD YYYY HH:MI:SS:MMMAM (or PM) 1
Default + milliseconds
SELECT CONVERT(VARCHAR(26), GETDATE(), 109)
Apr 28 2006 12:32:29:253PM 1
MM-DD-YY
USA
SELECT CONVERT(VARCHAR(8), GETDATE(), 10) AS [MM-DD-YY]
01-01-06
MM-DD-YYYY
USA
SELECT CONVERT(VARCHAR(10), GETDATE(), 110) AS [MM-DD-YYYY]
01-01-2006
YY/MM/DD
-
SELECT CONVERT(VARCHAR(8), GETDATE(), 11) AS [YY/MM/DD]
98/11/23
YYYY/MM/DD
-
SELECT CONVERT(VARCHAR(10), GETDATE(), 111) AS [YYYY/MM/DD]
1998/11/23
YYMMDD
ISO
SELECT CONVERT(VARCHAR(6), GETDATE(), 12) AS [YYMMDD]
980124
YYYYMMDD
ISO
SELECT CONVERT(VARCHAR(8), GETDATE(), 112) AS [YYYYMMDD]
19980124
DD Mon YYYY HH:MM:SS:MMM(24h) 1
Europe default + milliseconds
SELECT CONVERT(VARCHAR(24), GETDATE(), 113)
28 Apr 2006 00:34:55:190 1
HH:MI:SS:MMM(24H)
-
SELECT CONVERT(VARCHAR(12), GETDATE(), 114) AS [HH:MI:SS:MMM(24H)]
11:34:23:013
YYYY-MM-DD HH:MI:SS(24h)
ODBC Canonical
SELECT CONVERT(VARCHAR(19), GETDATE(), 120)
1972-01-01 13:42:24
YYYY-MM-DD HH:MI:SS.MMM(24h)
ODBC Canonical(with milliseconds)
SELECT CONVERT(VARCHAR(23), GETDATE(), 121)
1972-02-19 06:35:24.489
YYYY-MM-DDTHH:MM:SS:MMM
ISO8601
SELECT CONVERT(VARCHAR(23), GETDATE(), 126)
1998-11-23T11:25:43:250
DD Mon YYYY HH:MI:SS:MMMAM 1
Kuwaiti
SELECT CONVERT(VARCHAR(26), GETDATE(), 130)
28 Apr 2006 12:39:32:429AM 1
DD/MM/YYYY HH:MI:SS:MMMAM
Kuwaiti
SELECT CONVERT(VARCHAR(25), GETDATE(), 131)
28/04/2006 12:39:32:429AM

Friday, July 11, 2008

ASP.NET Tutorials: Make ASP.NET Speak Typed Text

ASP.NET Tutorials: Make ASP.NET Speak Typed Text: "Make ASP.NET Speak Typed Text"

JD Edwards EnterpriseOne Customers

JD Edwards EnterpriseOne Customers

Microsoft | Oracle: PeopleSoft & JD Edwards Case Studies

Microsoft Oracle: PeopleSoft & JD Edwards Case Studies: "PeopleSoft & JD Edwards Case Studies"

Upgrading Oracle JD Edwards Enterprise One from SQL Server 2000 to SQL Server 2005

Microsoft Oracle: PeopleSoft & JD Edwards Whitepapers & Webcasts: "Upgrading Oracle JD Edwards Enterprise One from SQL Server 2000 to SQL Server 2005 Technical Hands-On Lab"


http://download.microsoft.com/download/6/b/6/6b6a714a-8f27-49f8-a9df-b18257d63a3f/UpgradingJDE-E1toSQL2005-LabManual.doc



www.svdeals.com

UFrame: goodness of UpdatePanel and IFRAME combined

CodeProject: UFrame: goodness of UpdatePanel and IFRAME combined. Free source code and programming help

UFrame makes a DIV behave like an IFRAME that can load any ASP.NET/PHP/HTML page and allows all postback and hyperlink navigation to happen within the DIV - a painless way to make regular pages fully AJAX enabled


www.visli.com

Page and User Control Communication

Page and User Control Communication: ASP Alliance
Abstract This article shows how the page and user controls within the page can communicate together with a little more work. It shows how the use of interfaces or custom page classes can make the application more efficient and reduce code.

ASP.NET MVC Tip #17 – How to Run an ASP.NET MVC Application - Stephen Walther on ASP.NET MVC

ASP.NET MVC Tip #17 – How to Run an ASP.NET MVC Application - Stephen Walther on ASP.NET MVC

Silverlight control samples for Beta 2

ASP.NET Debugging : Silverlight control samples for Beta 2: "Silverlight control samples for Beta 2"

Thursday, July 10, 2008

Easy SQL to XML with LINQ and Visual Basic 2008

Easy SQL to XML with LINQ and Visual Basic 2008: ASP Alliance

In this article, Richard demonstrates how to create an XML file from a SQL Server 2005 database using LINQ. He provides a detailed explanation of the relevant steps with the help of source code and screenshots captured from Visual Basic 2008 Express Edition. At the end of the article, he also gives a few references where you can learn more regarding the techniques involved with LINQ.

http://www.visli.com/

For Check Printing Setup new Account JD Edwards

For Check Printing Setup new Account
1.Define AC# and program Name for check printing in F0417 file.
2. Also Define AC# in P0030G Program.
3. Change account # in Processing Option.
http://www.svdeals.com/

Fast ASP.NET web page loading by downloading multiple javascripts after visible content and in batch

CodeProject: Fast ASP.NET web page loading by downloading multiple javascripts after visible content and in batch. Free source code and programming help

A web page can load a lot faster and feel faster if the Javascripts files referenced on the page can be loaded after the visible content has been loaded and multiple Javascripts files can be batched into one download. Browsers download one external Javascript at a time and sometimes pause rendering while a script is being downloaded and executed. This makes web pages load and render slow when there are multiple external Javascript references on the page. For every Javascript reference, browser stops downloading and processing of any other content on the page and some browsers (like IE6) pause rendering while it processes the Javascript. This gives a slow loading experience and the web page kind of gets 'stuck' frequently. As a result, a web page can only load fast when there are small number of external scripts on the page and the scripts are loaded after the visible content of the page has loaded.

www.visli.com

ASP.NET MVC in the Real World

SingingEels : ASP.NET MVC in the Real World
MVC (the "model view control" pattern) isn't new, but it is new to ASP.NET. If you're like me, you may have been impressed by a demo, but you've probably thought "how does this work in the real world?" I hope to answer that question in this article.
All of the MVC demos that I have seen show how quick and easy it is to get going with ASP.NET MVC (from here on I'll just say "MVC"). They show a CSS'd up site with a navigation section, and a main content section. And in very little code, and very little time, they show how to retrieve data from your Model (the "Controller" does this), and how to display it in your page (the "View" does this). It look so simple, but there are some design questions that need to be addressed. We'll discuss them as we look into MVC.

www.visli.com

Tuesday, July 8, 2008

LINQ to SQL - 5 Minute Overview

LINQ to SQL - 5 Minute Overview - Hooked on LINQ: "LINQ to SQL - 5 Minute Overview"

Introducing LINQ – Part 1

Introducing LINQ – Part 1: "Introducing LINQ – Part 1"

Using The Amazon Web Service From ASP.NET

Using The Amazon Web Service From ASP.NET: "Using The Amazon Web Service From ASP.NET"

Using ScriptManager with other frameworks

Using ScriptManager with other frameworks - Tales from the Evil Empire

Creating Custom Add-In Tasks for SAS Enterprise Guide 3.0

SAS Enterprise Guide

Image Processing in C#

Image Processing in C#

Persian Calendar with simulated PHP methods in C#

CodeProject: Persian Calendar with simulated PHP methods in C#. Free source code and programming help



www.svdeals.com

WPF Colors

CodeProject: WPF Colors. Free source code and programming help

Silverlight Password Box

CodeProject: Silverlight Password Box. Free source code and programming help

Send Calendar Appointment As Email Attachment

CodeProject: Send Calendar Appointment As Email Attachment. Free source code and programming help

Scrolling to a group with a ListView

CodeProject: Scrolling to a group with a ListView. Free source code and programming help

Build a Web Chat Application using ASP.Net 3.5, LINQ and AJAX (in C# 3.5 or VB 9.0).

CodeProject: Build a Web Chat Application using ASP.Net 3.5, LINQ and AJAX (in C# 3.5 or VB 9.0). Free source code and programming help

We will create a very simple web chat application using the latest ASP.Net 3.5 technologies from scratch.

CodeProject: XMLProfile - a non-MFC, non-STL class to read and write XML profile files. Free source code and programming help

CodeProject: XMLProfile - a non-MFC, non-STL class to read and write XML profile files. Free source code and programming help

Event Chain

CodeProject: Event Chain. Free source code and programming help

Beginners Guide To Threading In .NET Part 3 of n

CodeProject: Beginners Guide To Threading In .NET Part 3 of n. Free source code and programming help

Color Combo Box C#

CodeProject: ColorComboBox. Free source code and programming help
A ColorComboBox color picker using ToolStripDropDown.

http://www.visli.com/

Monday, July 7, 2008

Great User Experience Example in a Business Application C# WPF

Brad Abrams : Great User Experience Example in a Business Application: "Great User Experience Example in a Business Application"

Create a Template Helper Method C#

ASP.NET MVC Tip #14 – Create a Template Helper Method - Stephen Walther on ASP.NET MVC

Creating a Site Map for a ASP.Net Page

Creating a Site Map for a ASP.Net Page
A site map is a graph representing all the pages and directories in a web site. Site map information shows the logical coordinates of the page and allows dynamic access of the pages and render all navigational information in a graphical way. ASP.Net contains a rich navigation infrastructure which allows the developers to specify the site structure. Since the site map information is hierarchical in nature, it can be used as input for a hierarchical data source control such as SiteMapDataSource. The output of a SiteMapDataSource can be bound to hierarchical data-bound controls such as Menu or TreeView.

www.visli.com

Saturday, July 5, 2008

How write on Masterpage Label C# asp.net

To Access Master page Label from aspx page you have to do this:
Label lbl = (Label)this.Master.FindControl("Label1");
if (lbl !=null)
{
lbl.Text = "someText";
}

http://www.svdeals.com/

SingingEels : ADO.NET Data Services - AJAX Tree View

SingingEels : ADO.NET Data Services - AJAX Tree View
ADO.NET Data Services (formerly "project Astoria") is a new mindset to developing data driven applications. Based on a RESTful architecture, this tool provides powerful services for querying and altering your data. This article will walk you through the steps of exposing your data as a service and consuming it with AJAX.
The scenario that we're going to tackle is a common one, and the solution is brought to you by ADO.NET Data Services, the Entity Framework and ASP.NET AJAX. All in all, this is one of the simplest, yet most elegant pieces of code I've ever written. Here's our real-world problem: We want to display a tree view of our customers, and have the ability to "drill down" into the details of that customer including their orders, and the products in those orders.
So why is 'ADO.NET Data Services' the best solution here? What real, tangible benefits do we get from combining Astoria with AJAX? Is this going to be easy, or am I doing more work just to be cool? - All of these questions will be answered in just a few short minutes.

http://www.visli.com/

Thursday, July 3, 2008

StringBuilder and String Concatenation

StringBuilder and String Concatenation: "StringBuilder and String Concatenation"

// Put user code to initialize the page here
// Concatenation using string
Console.WriteLine("String routine");
string str = string.Empty;
DateTime startTime = DateTime.Now;
Console.WriteLine("Start time:" + startTime.ToString());
for(int i=0; i<10; i++)
{
str += i.ToString();
}
DateTime stopTime = DateTime.Now;
Console.WriteLine("Stop time:" + stopTime.ToString());

Listing 1

Now let's see the routine that uses the StringBuidler class. As you can see from Listing 2, we do the exact sample operation but this time we use StringBuilder.Append method to concatenate strings.

// Concatenation using StringBuilder
Console.WriteLine("StringBuilder routine");
StringBuilder builder = new StringBuilder();
startTime = DateTime.Now;
Console.WriteLine("Start time:" + startTime.ToString());
for(int i=0; i<10; i++)
{
builder.Append(i.ToString());
}
stopTime = DateTime.Now;
Console.WriteLine("Stop time:" + stopTime.ToString());

www.visli.com

Rating and labelling your ASP.NET website

Rating and labelling your ASP.NET website: "Rating and labelling your ASP.NET website"

Mysql Error C# - You can't specify target table ' Table Name' for update in FROM clause

MySQL doesn’t allow referring to a table that’s targeted for Delete/update in a FROM clause.
for delete
delete from OrderTable where Itmno = (select Itmno from (SELECT Itmno FROM OrderTable GROUP BY Itmno HAVING count(Itmno)>1 ) as x );
For update
Reference http://www.xaprb.com/blog/2006/06/23/how-to-select-from-an-update-target-in-mysql/
update OrderTable set Itmno = (select Itmno from (select * from OrderTable ) as x where prodtype= 'RET') where prodtype = 'WHL';

www.visli.com

Insert carriage return in sql-server table

carriage return/CHAR(13) when using SQL_SERVER insert/update statements
'some text' + char(13) + 'some more text'.
www.visli.com

Tuesday, July 1, 2008

Mysql Data Transfer from one server to other server - mysqldump

1>First run this command in you windows folder I mean in C:\Program Files\MySQL\MySQL Server 5.0\bin>
mysqldump -u root -p password -h Host IP DatabaseName>Sql_Text_file.sql
2> this will create all tables and data with insert command.
3> copy this script and connect to remote server by using mysql query browser and run to insert/create database and table.
www.visli.com - hot deals

InformIT: Using MySQL Client Programs > Using mysqldump

InformIT: Using MySQL Client Programs > Using mysqldump: "Using mysqldump"

Transfer MySQL database from one server to another UNIX / Linux server

How to: Transfer MySQL database from one server to another UNIX / Linux server: "How to: Transfer MySQL database from one server to another UNIX / Linux server"

How to Identify and Delete Duplicate SQL Server Records

How to Identify and Delete Duplicate SQL Server Records: "How to Identify and Delete Duplicate SQL Server Records"

/**********************************************Example of a simple duplicate data delete script.**********************************************/
/**********************************************Set up test environment**********************************************/SET NOCOUNT ON
--Create test tableIF OBJECT_ID('tDupData') IS NOT NULLDROP TABLE tDupDataGO
CREATE TABLE tDupData(lngCompanyID INTEGER ,strCompanyName VARCHAR(20),strAddress VARCHAR(10),dtmModified DATETIME)
--Create test dataINSERT INTO tDupData VALUES (1,'CompanyOne','Address1','01/15/2003')INSERT INTO tDupData VALUES (2,'CompanyTwo','Address2','01/15/2003')INSERT INTO tDupData VALUES (3,'CompanyThree','Address3','01/15/2003')INSERT INTO tDupData VALUES (2,'CompanyTwo','Address','01/16/2003') INSERT INTO tDupData VALUES (3,'CompanyThree','Address','01/16/2003')
-- Dup Data INSERT INTO tDupData VALUES (1,'CompanyOne','Address1','01/15/2003') GO
/**********************************************Finish set up**********************************************/
/**********************************************Simple duplicate data**********************************************/select * from tDupData--Create temp table to hold duplicate dataCREATE TABLE #tempduplicatedata(lngCompanyID INTEGER ,strCompanyName VARCHAR(20),strAddress VARCHAR(10),dtmModified DATETIME)
--Identify and save dup data into temp tableINSERT INTO #tempduplicatedataSELECT * FROM tDupDataGROUP BY lngCompanyID,strCompanyName,strAddress, dtmModifiedHAVING COUNT(*) > 1
--Confirm number of dup rowsSELECT @@ROWCOUNT AS 'Number of Duplicate Rows'
--Delete dup from original tableDELETE FROM tDupData FROM tDupDataINNER JOIN #tempduplicatedataON tDupData.lngCompanyID = #tempduplicatedata.lngCompanyIDAND tDupData.strCompanyName = #tempduplicatedata.strCompanyNameAND tDupData.strAddress = #tempduplicatedata.strAddressAND tDupData.dtmModified = #tempduplicatedata.dtmModified
--Insert the delete data backINSERT INTO tDupDataSELECT * FROM #tempduplicatedata
--Check for dup data.SELECT * FROM tDupDataGROUP BY lngCompanyID,strCompanyName,strAddress,dtmModifiedHAVING COUNT(*) > 1
--Check tableSELECT * FROM tDupData
--Drop temp tableDROP TABLE #tempduplicatedata
--drop test tableIF OBJECT_ID('tDupData') IS NOT NULLDROP TABLE tDupDataGO

CodeProject: End-to-End Real World BlackBerry Application, Part 1. Free source code and programming help

CodeProject: End-to-End Real World BlackBerry Application, Part 1. Free source code and programming help

Screen Shot Application.

CodeProject: Screen Shot Application. Free source code and programming help

GridView Enhancements and Fixes

CodeProject: GridView Enhancements and Fixes. Free source code and programming help

GridView Enhancements and Fixes

CodeProject: GridView Enhancements and Fixes. Free source code and programming help

An ASP.NET/AJAX Interface for Utorrent

CodeProject: An ASP.NET/AJAX Interface for Utorrent. Free source code and programming help

LINQ-to-SQL: Generic Primary Key function

CodeProject: LINQ-to-SQL: Generic Primary Key function . Free source code and programming help

Implementing an ugly tab structure in reporting services

CodeProject: Implementing an ugly tab structure in reporting services. Free source code and programming help

TetroGL: An OpenGL Game Tutorial in C++ for Win32 Platforms - Part 1

CodeProject: TetroGL: An OpenGL Game Tutorial in C++ for Win32 Platforms - Part 1. Free source code and programming help

Version control for SQL databases with SQL -> XML

CodeProject: Version control for SQL databases with SQL -> XML. Free source code and programming help: "Version control for SQL databases with SQL -> XML"

CodeProject: Demystify LINQ in 10 minutes. Free source code and programming help

CodeProject: Demystify LINQ in 10 minutes. Free source code and programming help: "Demystify LINQ in 10 minutes"

MySQL Datatypes Field Length

MySQL :: Visual Basic / MySQL Datatypes: "MySQL Datatypes"

TINYINT
-128 to 127
integer
-32,768 to 32,767
*
TINYINT UNSIGNED
0 to 255
byte
0 to 255

SMALLINT
-32,768 to 32,767
integer
-32,768 to 32,767

SMALLINT UNSIGNED
0 to 65,535
long
-2,147,483,647 to 2,147,483,647
*
MEDIUMINT
-8,388,608 to 8,388,607
long
-2,147,483,647 to 2,147,483,647
*
MEDIUMINT UNSIGNED
0 to 16,777,215
long
-2,147,483,647 to 2,147,483,647
*
INT
-2,147,483,647 to 2,147,483,647
long
-2,147,483,647 to 2,147,483,647

INT UNSIGNED
0 to 4,294,967,295
double
64 Bit
1*
BIGINT
64 Bit
N/A
N/A
2
FLOAT
32 Bit Floating Point
single
32 Bit Floating Point

DOUBLE
64 Bit Floating Point
double
64 Bit Floating Point

DECIMAL
Variable Floating Point
double
64 Bit Floating Point
3*
CHAR
1 to 255 Characters
string
1 to Approx. 2,000,000,000 Characters
*
VARCHAR
1 to 255 Characters
string
1 to Approx. 2,000,000,000 Characters
*
TINYTEXT
1 to 255 Characters
string
1 to Approx. 2,000,000,000 Characters
*
TEXT
1 to 65535 Characters
string
1 to Approx. 2,000,000,000 Characters
4*
MEDIUMTEXT
1 to 16,777,215 Characters
string
1 to Approx. 2,000,000,000 Characters
4*
LONGTEXT
1 to 4,294,967,295 Characters
N/A
N/A
5
all BLOB types
1 to 4,294,967,295 Bytes
Variant
Varies
6
DATE
Date without Time
date
Date and Time value
*
DATETIME
Date and Time
date
Date and Time value

TIMESTAMP
Date and Time
date
Date and Time value

TIME
Time
date
Date and Time value
*
YEAR
Year
integer
-32,768 to 32,767
*
ENUM
Enumeration of Value Set
string
1 to Approx. 2,000,000,000 Characters
*
SET
Set of Values
string
1 to Approx. 2,000,000,000 Characters
*
Notes: