Friday, August 29, 2008

StubHub.com Clone - Affiliate website

StubHub.com Clone - Affiliate Site
1> Get registered from stubhub affiliate - http://www.stubhub.com/affiliate (earn 8% of confirmed purchase.)
2> Get the data from http://www.stubhub-feeds.com/datafeeds/, download and uplaod to your table.
3> Use this data to create a website like this http://www.visli.com/vislitickets/stub1.aspx.
Technology used - asp.net,access,C#.

Wednesday, August 27, 2008

Google Suggest FAQ

Google Suggest FAQ: "Google Suggest : Frequently Asked Questions"


What is Google Suggest?
That's pretty cool. How does it do that?
Google works well as is. Why use Google Suggest search?
How do I get back to normal Google?
Can I make Google Suggest my default search tool?
How about a few examples of when it works best?
When will you support other languages?
Here's my comment about Google Suggest. Ready to write this down?
I don't want anyone to known I'm into lemur racing. Is my information private?
Can Google Suggest see what I'm typing?
Do I need a specific browser to use Google Suggest?

WORD Document Find and replace , with Enter key or new line

I got a doucument with all the 10,000 items separated with "," , now I need to upload this data in excel/sql table. If I will able to do all the Items in one row I can upload or do copy and paste.
original doc
1608129, 1613880, 1614159, 1614206, 1615976, 1616131, 1616132, 1616174, 1616299, 1616352, 1616623, 1616723, 1616744, 1616804, 1616859, 1616860, 1616947, 1616956, 1616968, 1616971, 1616976, 1616980, 1616981, 1616991, 1616994, 1616997, 1617017, 1617025, 1617036, 1617039, 1617040, 1617043, 1617049, 1617052, 1617053, 1617065, ........
I will have to do
1608129
1613880
1614159
1614206
1615976
1616131
1616132
1616174
1616299
....
....

What I did find and replace comma , with
,
1608129
1613880
1614159
1614206
1615976
1616131
1616132
1616174

after open an html editor (visual stdios / blogger)
and paste. after that I did browse/ Preview in IE , got data in
1608129
1613880
1614159
1614206
1615976
1616131
above form copy and paste this data in text file after that you can upload this data.

Tuesday, August 26, 2008

stubhub data feeds

Index of /datafeeds

Parent Directory 21-Jul-2008 15:48 -
CJ_Product_Feed.csv 22-Aug-2008 00:12 12.8M
Full_Affiliate_Feed.csv 22-Aug-2008 00:04 9.9M
Full_Affiliate_Feed.txt 22-Aug-2008 00:04 9.9M
Genres.csv 19-Aug-2008 18:24 3.0M
Kowabunga_Feed.csv 22-Aug-2008 00:05 11.1M
Kowabunga_Feed.txt 22-Aug-2008 00:05 11.1M
Prices_Feed.csv 22-Aug-2008 00:06 398k
Prices_Feed.txt 22-Aug-2008 00:06 398k
Venue_Info.csv 19-Aug-2008 18:21 1.3M
Venue_Info.txt 19-Aug-2008 18:22 1.3M

Running a Web Site in Kiosk Mode with C#

CodeProject: Running a Web Site in Kiosk Mode with C#. Free source code and programming help

Displaying Image in Gridview from Access Database With Hyperlink


Displaying Image in Gridview from Access Database With Hyperlink / or url .
Please Double click on image to see.


Button Generator / Button Maker

Buttonator

http://www.buttonator.com/

WiiWare and Virtual Console releases for this week | Crave, the gadget blog - CNET

WiiWare and Virtual Console releases for this week Crave, the gadget blog - CNET

Does TraceMonkey kick Firefox into turbo mode?

Does TraceMonkey kick Firefox into turbo mode? Hardware 2.0 ZDNet.com

Adobe Photoshop Elements 7 Photo Editing Software

Adobe Photoshop Elements 7 Photo Editing Software - washingtonpost.com

With its attractive new image-editing features and its expansion into online photo sharing, Photoshop Elements 7 is a worthy upgrade.

Adobe obviously pays attention to what's hot these days. And online photo sharing is more popular than ever, with sites like Flickr and Facebook and programs like Apple iPhoto keeping people connected through photos, blogs, and blurbs. With Photoshop Elements 7 ($100, or $150 when bundled with Photoshop Premiere Elements 7 video-editing software; in private beta, due in October), Adobe provides ties to its forthcoming online service, Photoshop.com, and adds enough new features to the desktop app itself to make version 7 a worthy upgrade.

Monday, August 25, 2008

Bounce Rate And Exit Rate

A bounce rate is the percentage of visitors that leave a website within x number of seconds without visiting any other page.
Bounce Rate is the percentage of visitors that land on a page and do not visit any other page on your site. This is a very telling sign. If you are using pay per click marketing or any other marketing tactic that will send visitors directly to your landing page and the bounce rate is high, that page is not working.
Exit Rate is the percentage of visits that leave the page based on the number of visits that page has experienced. The difference compared to bounce rate is, an exit rate visitor might have come to the page from another web page on your site then exited your web site.

An exit rate helps determine where there are other problems on your site. For example, if visitors click from your landing page to a category and then to the product page but before making a purchase leave, then you know that there must be something preventing them from completing the process.
Both bounce rates and exit rates are very important numbers and tell you very different useful information about your site. A bounce rate is an extremely important metric to measure how well a landing page on your site does. If people are clicking on a ppc campaign or an organic search result and landing on your site but leaving before navigating to any other page then you know right away that there is a problem with your landing page and can address that.

Bounce Rate And Exit Rate

A bounce rate is the percentage of visitors that leave a website within x number of seconds without visiting any other page.

Bounce Rate is the percentage of visitors that land on a page and do not visit any other page on your site. This is a very telling sign. If you are using pay per click marketing or any other marketing tactic that will send visitors directly to your landing page and the bounce rate is high, that page is not working.

Exit Rate is the percentage of visits that leave the page based on the number of visits that page has experienced. The difference compared to bounce rate is, an exit rate visitor might have come to the page from another web page on your site then exited your web site.

An exit rate helps determine where there are other problems on your site. For example, if visitors click from your landing page to a category and then to the product page but before making a purchase leave, then you know that there must be something preventing them from completing the process.

Both bounce rates and exit rates are very important numbers and tell you very different useful information about your site. A bounce rate is an extremely important metric to measure how well a landing page on your site does. If people are clicking on a ppc campaign or an organic search result and landing on your site but leaving before navigating to any other page then you know right away that there is a problem with your landing page and can address that.

 

 

AdRotator control with Database Integration Asp.Net C#

Asp.Net AdRotator control with Database Integration - AdRotator Control with XML File
This article explains the concept of Asp.Net AdRotator control fetching ad information from the database and rotates the ads on certain time interval. This article also gives a tip to fetch ad information from an XML file.

Create an Auto-Complete Text Field

ASP.NET MVC Tip #37 – Create an Auto-Complete Text Field - Stephen Walther on ASP.NET MVC

In this tip, Stephen Walther demonstrates how you can create an auto-complete text field in an MVC view by taking advantage of the Ajax Control Toolkit. He explains how you can create a custom Ajax Helper that renders the necessary JavaScript.

Friday, August 22, 2008

If condition in Condition in AccessDataSource / SQLDataSource in C#

I like to put condition in datasource , if there is a parameter(ie default.aspx?aaa=Y) run one sql if there is no parameter(ie default.aspx) then run another sql. how to put sql command in following selectcommand.
 
 
solution:
 code behind (e.g. in the Page_Load method):
 
if (Request.QueryString["genTY"] == "...")
  AccessDataSource5.SelectCommand = "..."
else
  AccessDataSource5.SelectCommand = "..."


Get ideas on sharing photos from people like you. Find new ways to share. Get Ideas Here!

Request.Params - Passing Values

Passing Values using Request.Params
 
You can pass values from one page to another using Request.Params collection which returns collection of Form elements, Cookies, Server Variables and QueryString.
  if(Request.Params.Get("txtUserName") != null)
   {
    string userName = Request.Params.Get("txtUserName");
    Response.Write(userName);
   }


--
Rajeev Kumar

Thursday, August 21, 2008

Download SQL Server 2008 Express

Download SQL Server 2008 Express
 
http://www.microsoft.com/downloads/details.aspx?FamilyID=58ce885d-508b-45c8-9fd3-118edd8e6fff&DisplayLang=en
 


Get thousands of games on your PC, your mobile phone, and the web with Windows®. Game with Windows

PIVOT SQL-Server 2005 with sample

The PIVOT keyword is new in SQL 2005. It was designed for pivots and its syntax is more readable than a group of CASE statements. This next statement produces a report identical to the proceeding CASE Cross Tab. In the code below, SUM specifies the grid data and FOR dictates the horizontal axis, IN creates a filter for SUM to match.
YearSold Quarter Amount
#sales Table Data
2003 Q1 1.00
2003 Q2 2.00
2003 Q3 3.00
2003 Q4 4.00
2004 Q1 5.00
2004 Q2 6.00
2004 Q3 7.00
2004 Q4 8.00
2005 Q1 9.00
2005 Q2 10.00
2005 Q3 0.00
2005 Q4 0.00

PIVOT Query


SELECT * FROM #sales
PIVOT
(
SUM(Amount)
FOR Quarter
IN (Q1, Q2, Q3, Q4)
)
AS p

YearSold Q1 Q2 Q3 Q4
2003 1.00 2.00 3.00 4.00
2004 5.00 6.00 7.00 8.00
2005 9.00 10.00 0.00 0.00

Wednesday, August 20, 2008

Adding HyperLink Field programmatically Dymaic to a GridView

GridView gv = new GridView();
gv.DataSource = dt;
gv.AutoGenerateColumns = true;
HyperLinkField HLF = new HyperLinkField();

HLF.Text = "Test";
HLF.HeaderText = "Test";
HLF.Visible = true;
gv.Columns.Add(HLF);
gv.DataBind();
PlaceHolder1.Controls.Add(gv);

Tuesday, August 19, 2008

GDI - Graphic Device Interface Tutorial

ASP.NETMadeEazy - GDI+ Tutorial: "GDI+ Tutorial"
GDI+ (Windows Graphic Device Interface) is a class in .NET Framework for creating graphics, drawing text, and manipulating graphical images. With GDI+ you can draw your own image in ASP.NET page.
In this tutorial you will learn how to use GDI+ in ASP.NET Web application.

Gridview Data display header and detail in same column

Gridview Data display header and detail - ASP.NET Forums


private string _categoryName = String.Empty;
protected void gvProducts_RowDataBound(object sender, GridViewRowEventArgs e)
{
GridViewRow gvr = e.Row;
if (gvr.RowType == DataControlRowType.DataRow)
{
DataRowView drv = gvr.DataItem as DataRowView;
if (drv == null) { return; }
string categoryName = drv["GENREPARENT"].ToString();
if (!categoryName.Equals(_categoryName))
{
GridViewRow row = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal);
TableCell cell = new TableCell();
cell.HorizontalAlign = HorizontalAlign.Center;
cell.Text = categoryName;
row.Cells.Add(cell);
gvProducts.Controls[0].Controls.AddAt(gvProducts.Controls[0].Controls.Count - 1, row);
_categoryName = categoryName;
}
}
}

How to create a file with Header, details & footer

SQL Server Forums - How to create a file with Header, details & footer

SQL-SERVER ROLLUP Onhand quantity JD Edwards

Select CASE WHEN (Grouping(CategoryName)=1) THEN 'MainTotal' ELSE categoryname END AS CategoryName, CASE WHEN (Grouping(ProductName)=1) THEN 'SubTotal' ELSE Productname END AS ProductName, Sum(UnitPrice) as unitprice, Sum(UnitsinStock) as UnitsinStock from jde_rk.dbo.Products Products INNER JOIN jde_rk.dbo.Categories Categories On Products.categoryID = Categories.CategoryID Group By Categoryname, ProductName WITh ROLLUP

IBM MAINFRAME COMPILE JCLS RUN JCLS SAMPLE COMPILER CODES COBOL JCL CICS DB2

IBM MAINFRAME COMPILE JCLS RUN JCLS SAMPLE COMPILER CODES COBOL JCL CICS DB2

How can i run mainframe cobol and jcl in my PC(without internet)? - Yahoo! Answers India

How can i run mainframe cobol and jcl in my PC(without internet)? - Yahoo! Answers India: "How can i run mainframe cobol and jcl in my PC(without internet)?"

Monday, August 18, 2008

Unable to send mail! The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available

Unable to send mail! The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available .
use following code to correct

objEmail.Body = EmailBody;
objEmail.Priority = MailPriority.High;
objEmail.BodyFormat = MailFormat.Html;
objEmail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2;
objEmail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"] = "mail.domain.net";

objEmail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "newsletter@domain.net";
objEmail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "password";
objEmail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1;
System.Web.Mail.SmtpMail.SmtpServer = "servername or IP";

Writing SEO friendly url using HttpHandlers in ASP.NET

CodeProject: Writing SEO friendly url using HttpHandlers in ASP.NET. Free source code and programming help: "Writing SEO friendly url using HttpHandlers in ASP.NET"

Gridview text header

Clone a Website

This must mean to simply create a copy of a website. The expression tools Microsoft have just released include functionality that allows you to build a website by pointing at the web. looks cool and builds all the css, markup etc.

Sunday, August 17, 2008

A Beginners Guide to use LINQ to SQL within ASP.NET in Visual Studio 2008 and CSharp(C#).

ProgTalk - A Beginners Guide to use LINQ to SQL within ASP.NET in Visual Studio 2008 and CSharp(C#).

Subject: This tutorial will explain how to incorporate LINQ with your web applications. This is designed as a step by step guide for developers ranging from beginner to advanced levels. If you have never used LINQ before, this is a great starting tutorial.

Friday, August 15, 2008

JD Edwards Run Programs from Web page

JD Edwards Run Programs from Web page
www.visli.com

Thursday, August 14, 2008

Mass Email from Webpage using C# asp.net, access database

Mass Email from webpage using asp.net 2.0, C# from Access Database , double Click and see following codes.You can use this software to send newsletter etc.









Google Checkout NET Sample Code

Google Checkout NET Sample Code
Google Checkout's sample code for .NET is distributed as a .zip file. This file contains classes and methods designed to construct Google Checkout API requests and handle Google Checkout API responses, notifications and merchant calculation callbacks. This code is intended to be integrated directly into your web application.
Contents
This page provides an overview of the Google Checkout .NET sample code. This page is divided into the following sections:
The System Requirements section identifies a list of prerequisites for merchants who plan to use this sample code in their Google Checkout implementations.
The Application Flow for Google Checkout .NET Sample Code section illustrates and explains the process of sending a Checkout API request using the .NET sample code.
The Installing the GCheckout Module section explains how to install and test the Google Checkout sample code for .NET.
The Complex Shopping Cart Example section provides sample code changes for submitting a complex shopping cart. After ensuring that your installation was successful, you can use this sample code to better understand how to create Checkout API requests and how your customer will interact with Google Checkout after clicking the Google Checkout button.
The Integrating the Sample Code into your Web Application contains general information about the code changes that you will need to make when integrating this sample code into your web application.
The Understanding the .NET Sample Code Distribution section provides a short description of each class (.cs) file included in the sample code distribution and links to pages that provide more complete documentation of the individual methods contained in those classes. These pages include a list of all of the methods in a particular class, including an explanation of each method, a list of that method's parameters and the method's code.
The classes in the GCheckout.zip file correspond to the different types of API requests that you can send using Google Checkout. As such, you may be able to disregard certain classes if you are not using the APIs that those files implement.
Note: The sample code in this document uses the alternate method for posting Checkout API requests. This method is described in the Google Checkout Developer's Guide. The sample code uses this alternate technique because ASP.NET uses forms to handle events like button clicks, meaning many ASP.NET pages contain a form. Using the standard method of posting a Checkout API request might require you to add a second form to a page. However, since browsers do not support nested form elements, this approach would not work. The alternate technique for posting carts provides a solution to this problem.

http://code.google.com/apis/checkout/samples/Google_Checkout_Sample_Code_NET.html

how to let the web.config in the sub-directory to NOT to inherited from Root's web.config.

how to let the web.config in the sub-directory to NOT to inherited from Root's web.config.: "ASP Net - how to let the web.config in the sub-directory to NOT to inherited from Root's web.config."

connectionStrings section in Web.config in sub-directory

connectionStrings section in Web.config in sub-directory - ASP.NET Forums

Wednesday, August 13, 2008

CodeProject: Using ADO.NET for beginners. Free source code and programming help

CodeProject: Using ADO.NET for beginners. Free source code and programming help: "Using ADO.NET for beginners"

CodeProject: Using ADO.NET for beginners. Free source code and programming help

CodeProject: Using ADO.NET for beginners. Free source code and programming help: "Using ADO.NET for beginners"

At least one of the From or Sender fields is required, and neither was found. - ASP.NET Mail

At least one of the From or Sender fields is required, and neither was found. - ASP.NET Forums: "At least one of the From or Sender fields is required, and neither was found."


Have you actually run the code and debugged it, or done a Response.Write() of each of the values to verify that what you think you are setting is being sent?

yes. the variable that was holding the email address was not sticking. I loaded it into a session variable and everything works fine. It's EXTREMELY tempting to use session variables for EVERYTHING... im holding back, but oh brother!!!

Troubleshooting System.Web.Mail Asp.net C#

Troubleshooting System.Web.Mail

System.Web.Mail
FAQ Complete FAQ Listing
4 Troubleshooting System.Web.Mail* You Are Here * [ Scroll To Answer ] [ Discuss ]
4.1 A Word About Exceptions (READ THIS FIRST)
4.2 Namespace/COM/DLL Related Exceptions
4.2.1 Error loading type library/DLL.
4.2.10 "Could not access 'CDO.Message' Object - Part 8
4.2.11 "Could not access 'CDO.Message' Object - Part 9
4.2.2 The "SendUsing" configuration value is invalid.
4.2.3 The scary "Could not access 'CDO.Message' object"
4.2.4 "Could not access 'CDO.Message' Object - Part 2
4.2.5 "Could not access 'CDO.Message' Object - Part 3
4.2.6 "Could not access 'CDO.Message' Object - Part 4
4.2.7 "Could not access 'CDO.Message' Object - Part 5
4.2.8 "Could not access 'CDO.Message' Object - Part 6
4.2.9 "Could not access 'CDO.Message' Object - Part 7
4.3 SMTP Protocol/Network Related Exceptions
4.3.1 The server specified in the SmtpServer property is not valid or not available
4.3.10 Can send locally but not externally.
4.3.11 550 x.x.x Unable to relay for xxxxx.
4.3.2 [COMException (0x8004020f): The server rejected one or more recipient addresses."]
4.3.3 Some of emails are rejected by some clients, but not all.
4.3.4 My mail server requires authentication. (503 This mail server requires authentication)
4.3.5 Not a gateway or local host.
4.3.6 The specified protocol is unknown.
4.3.7 The specified protocol is unknown. Part 2
4.3.8 The server response was 452 Filesystem error - message not accepted.
4.3.9 The transport failed to connect to the server.
4.4 Other Problems/Exceptions
4.4.1 How can I stream attachments into the MailMessage?
4.4.2 How can I create an attachment from a string?
4.4.3 Why does System.Web.Mail work in development and not in production?
4.4.4 I keep getting question marks (?'s) in my email, where characters should be.
4.4.5 System.Web.Mail is truncating the message body.
4.4.6 Attachments added to the MailMessge are corrupt.
4.4.7 All of my emails are ending up in the /badmail directory.
4.4.8 System.Web.Mail is corrupting my PDF attachments, what gives?

Tuesday, August 12, 2008

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

CodeProject: Store and retrieve objects as BLOBs in SQL Server 2000 and 2005 using ASP.NET 2.0. Free source code and programming help

CodeProject: Store and retrieve objects as BLOBs in SQL Server 2000 and 2005 using ASP.NET 2.0. Free source code and programming help: "Store and retrieve objects as BLOBs in SQL Server 2000 and 2005 using ASP.NET 2.0"

CodeProject: Developing custom ASP.NET Membership and Role providers reading users from custom section in the web.config. Free source code and programming help

CodeProject: Developing custom ASP.NET Membership and Role providers reading users from custom section in the web.config. Free source code and programming help: "Developing custom ASP.NET Membership and Role providers reading users from custom section in the web.config"

How do Convert IP Address to Country Name

CodeProject: How do Convert IP Address to Country Name. Free source code and programming help: "How do Convert IP Address to Country Name"
How do I convert a IP Address to a IP Number?
IP address (IPV4) is divided into 4 sub-blocks. Each sub-block has a different weight number each powered by 256. IP number is being used in the database because it is efficient to search between a range of number in database.Beginning IP number and Ending IP Number are calculated based on following formula:
IP Number = 16777216*w + 65536*x + 256*y + z (1)whereIP Address = w.x.y.z
For example, if IP address is "202.186.13.4", then its IP Number "3401190660" is based on the formula (1).
IP Address = 202.186.13.4So, w = 202, x = 186, y = 13 and z = 4IP Number = 16777216*202 + 65536*186 + 256*13 + 4 = 3388997632 + 12189696 + 3328 + 4 = 3401190660
To reverse IP number to IP address,
w = int ( IP Number / 16777216 ) % 256x = int ( IP Number / 65536 ) % 256y = int ( IP Number / 256 ) % 256z = int ( IP Number ) % 256where
%
is the mod operator and
int
returns the integer part of the division.
How do I retrieve the Country Name and Country Code from the IP Number?
Search the IP-Country database to match a unique record that has the IP Number fits between Beginning IP Number and Ending IP Number.For example, IP Address "202.186.13.4" is equivalent to IP Number "3401190660". It belongs to the following record in the database because it is between the beginning and the ending of IP number.
"3401056256","3401400319","MY","MALAYSIA"
From the recordset, the Country Name is Malaysia and Country Code is MY.http://www.ip2location.com/faqs-ip-country.aspx

Software Architecture Interview Questions Part 2 ( Design pattern )

CodeProject: Software Architecture Interview Questions Part 2 ( Design pattern ). Free source code and programming help: "Software Architecture Interview Questions Part 2 ( Design pattern )"

(I) what is Interpreter pattern?
(B) Can you explain iterator pattern?
(A) Can you explain mediator pattern?(I) Can you explain memento pattern?
(B) Can you explain observer pattern?
Other Interview question PDF's

Adding Kontera Ads to your Blogger.com Blog | The Official Kontera Blog

Adding Kontera Ads to your Blogger.com Blog The Official Kontera Blog: "Adding Kontera Ads to your Blogger.com Blog"

LINQ Videos

LINQ Videos : The Official Microsoft ASP.NET Site

These videos are focused on the new LINQ language features included in Visual Studio 2008. LINQ stands for Language Integrated Query, and it enables you to write queries over things like objects, databases, and XML in a standard way using new language syntax.

ASP.NET in .NET 3.5 Service Pack 1

ASP.NET in .NET 3.5 Service Pack 1 : The Official Microsoft ASP.NET Site

ASP.NET in the .NET Framework 3.5 Service Pack 1 release includes numerous bug fixes. In addition, it includes features for the following:
Enabling high-productivity data scenarios by using ASP.NET Dynamic Data.
Supporting the browser navigation in ASP.NET AJAX applications by using ASP.NET AJAX browser history.
Increasing the download speed for ASP.NET applications by using ASP.NET AJAX script combining.
Read on to find answers to the following questions:

What are the new features?
Where can I find these new features?
Where can I find the features that were in the ASP.NET 3.5 Extensions December 2007 CTP?
Where can I ask questions and discuss these features?
Where can I learn more?

A Web based application configuration wizard

CodeProject: A Web based application configuration wizard. Free source code and programming help

Creating a Custom Data Field Control - Part 2: ASP Alliance

Creating a Custom Data Field Control - Part 2: ASP Alliance

Complex Data Binding with the Accordion Control

Complex Data Binding with the Accordion Control: ASP Alliance
Abstract The Accordion control is a flexible way to group data output to the screen. This article demonstrates the usage of the control to data bind information in ASP.NET. Brian clearly examines each step in detail with the help of database structure diagram, relevant explanation, and plenty of source code.


Introduction
The Accordion control is a flexible control that neatly separates the region of the user interface and condenses the overall user interface. This control can support data binding, which I personally did not know until recently. The Accordion control supports binding data to the Header and Content templates, and we will explore how to setup some more complex interfaces of these scenarios in this article.

screen Showing....... dot dot VS 2005 how to hide this.

You have View White Space toggled on.
Go to Edit, Advanced, View White Space...
Or, use Ctrl+R Ctrl+W to toggle it on and off.

connection String

add name="Personal" connectionString="Server=whsql-v04.prod.mesa1.secureserver.net;Database=DB_675;User ID=user_id;Password=password;Trusted_Connection=False" providerName="System.Data.SqlClient" />

Friday, August 8, 2008

Compact an Access Database with VBS Script

Compact an Access Database with VBS Script: "Compact an Access Database with VBS Script"

Compact and repair an Access database

Compact and repair an Access file - Access - Microsoft Office Online

To ensure optimal performance, you should compact and repair your Microsoft Access files on a regular basis. Also, if a serious problem occurs while you are working in an Access file and Access attempts to recover it, you might receive a message that the repair operation was cancelled and that you should compact and repair the file.
Caution When you compact a Microsoft Access file located on a volume that uses the NTFS file system, Access removes the existing file and replaces it with the compacted file. It then applies the default file permissions to the new file. If the file is an Access database (Microsoft Access database: A collection of data and objects (such as tables, queries, or forms) that is related to a particular topic or purpose. The Microsoft Jet database engine manages the data.), use Access user-level security (user-level security: When using user-level security in an Access database, a database administrator or an object's owner can grant individual users or groups of users specific permissions to tables, queries, forms, reports, and macros.) instead of file-level permissions. Otherwise, use folder permissions. For more information about the NTFS file system and folder permissions, see Windows Help.
You must have Open/Run and Open Exclusive permissions (permissions: A set of attributes that specifies what kind of access a user has to data or objects in a database.) for an Access database in order to compact and repair it.
Compact and repair the current Access file
If you are compacting a shared Microsoft Access database (multiuser (shared) database: A database that permits more than one user to access and modify the same set of data at the same time.) that is located on a server or shared folder, make sure that no one else has it open.
On the Tools menu, point to Database Utilities, and then click Compact and Repair Database/Project.
Compact and repair an Access file that is not open
Close the current Microsoft Access file. If you are compacting a shared Access database (multiuser (shared) database: A database that permits more than one user to access and modify the same set of data at the same time.) that is located on a server or shared folder, make sure no one else has it open.
On the Tools menu, point to Database Utilities, and then click Compact and Repair Database.
In the Database to Compact From dialog box, specify the Access file you want to compact, and then click Compact.
In the Compact Database Into dialog box, specify a name, drive, and folder for the compacted Access file.
Click Save.
If you use the same name, drive, and folder, and the Access database or Access project is compacted successfully, Microsoft Access replaces the original file with the compacted version.
Compact and repair an Access file automatically every time you close it
Compacting does not occur if you close a shared Access database (multiuser (shared) database: A database that permits more than one user to access and modify the same set of data at the same time.) while another user has it open.
Open the Access database or Access project that you want Microsoft Access to compact automatically.
On the Tools menu, click Options.
Click the General tab.
Select the Compact on Close check box.
Note You can stop the compact and repair process by pressing CTRL+BREAK or ESC.

Thursday, August 7, 2008

ASP.NET AJAX Development Approach Part 1

ASP.NET AJAX Development Approach Part 1


Introduction
The ASP.NET AJAX framework, along with the AJAX Control Toolkit that adds additional controls, extenders, and other client and server objects, provides a new unique way to develop .NET controls. It leverages the existing structures in JavaScript to create a wide array of add-ons that make developing JavaScript code easier than what it was.
In this article, I plan to review some of the new features available in the JavaScript language that Microsoft added in. I should say now that the additions are not new coding conventions to JavaScript. Rather; all of the approaches utilize all of the existing development structures available in the JavaScript language. The client library works within these constructs to make additional coding styles available. Let’s first look at the available constructs.
One important note to the reader: the ASP.NET AJAX framework exists in both a server and client form. In this article, I’m mentioning the client form mostly, which I’ll refer to as the ASP.NET AJAX client library, client library, or JavaScript library.

Wednesday, August 6, 2008

Developing Windows Services using Visual Studio .NET Explained - Part 2

CodeProject: Developing Windows Services using Visual Studio .NET Explained - Part 2. 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

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

Firefox bookmark manager by C# and XML

CodeProject: Firefox bookmark manager by C# and XML. Free source code and programming help

A Common Base Class for LINQ to SQL

CodeProject: A Common Base Class for LINQ to SQL. Free source code and programming help

Exporting a DataGridView to an Excel/PDF/image file by using Reporting Services report generation

CodeProject: Exporting a DataGridView to an Excel/PDF/image file by using Reporting Services report generation. Free source code and programming help

SQL Compact 3.5 Tidbits & Gotchas!

CodeProject: SQL Compact 3.5 Tidbits & Gotchas!. Free source code and programming help

Software Architecture Interview Question Part 1 ( Design Pattern )

CodeProject: Software Architecture Interview Question Part 1 ( Design Pattern ). Free source code and programming help: "Software Architecture Interview Question Part 1 ( Design Pattern )"

Microsoft Analysis Services 2005: Displaying grid using ADOMD.NET and MDX

CodeProject: Microsoft Analysis Services 2005: Displaying grid using ADOMD.NET and MDX. Free source code and programming help: "Microsoft Analysis Services 2005: Displaying grid using ADOMD.NET and MDX"

Change the height of a PropertyGrid's description area

Private bool ResizeDescriptionArea(ref PropertyGrid grid, int nNumLines)
{
try
{
System.Reflection.PropertyInfo pi = grid.GetType().GetProperty("Controls");
Control.ControlCollection cc = (ControlCollection)pi.GetValue(grid, null);
foreach(Control c in cc)
{
Type ct = c.GetType();
string sName = ct.Name;

if(sName == "DocComment")
{
pi = ct.GetProperty("Lines");
pi.SetValue(c, nNumLines, null);
System.Reflection.FieldInfo fi = ct.BaseType.GetField("userSized",
System.Reflection.BindingFlags.Instance,
System.Reflection.BindingFlags.NonPublic);

fi.SetValue(c, true);
}
}
return true;
}
catch(Exception error)
{
#if(DEBUG)
MessageBox.Show(error.Message, "ResizeDescriptionArea()");
#endif

return false;
}
}

private void Form1_load(object sender, System.EventArgs e)
{ . . .
ResizeDescriptionArea(ref grid1, 6);
}

Monday, August 4, 2008

App_Code vs. ascx: Differences you should know

App_Code vs. ascx: Differences you should know: "App_Code vs. ascx: Differences you should know"
There's an important factor you should consider when deciding whether to implement your control as an .ascx UserControl or as a Control subclass in App_Code.
Will you ever need to pass a relative path to the control, through a method or attribute? Does your control function as a container for markup? .ascx UserControls believe that all relative paths are relative to them. I've experimented with a lot of different things, and I'm convinced there is no elegant workaround. While it is possible to set the value of AppRelativeTemplateSourceDirectory, it's not possible to reliably figure out what the value should be. If your user controls and pages are in the same directory, you may not discover this problem until you reorganize your app files!
The instinctive approach is to reach for the .Parent property, but that doesn't work in a some common situations. In particular, this approach won't work directly inside controls, since they incorrectly report themselves as children of the master page instead of the content page. Correcting for this becomes difficult if you plant to support the use of the controls within the master pages themselves, or support nested master pages. I use content pages exclusively, and I like to keep things simple - so at least 95% of my server controls are right inside the root tags. Ouch.
If your control is going to contain other arbitrary controls, markup, or accept paths, you definitely need to go with the App_Code approach. Going with an .ascx file will make all child controls (even if built correctly!) rebase paths relative to your user control, not the file containing the markup.
In case you're curious, the TemplateControl class (which UserControl, Page, and MasterPage inherit from), overrides the TemplateControl property from the Control class.
view plaincopy to clipboardprint?
internal override TemplateControl GetTemplateControl()
{
return this;
} internal override TemplateControl GetTemplateControl()
{
return this;
}
And when your .ascx file is translated into source code for compilation, the following line is inserted into the Page_Load event handler:
view plaincopy to clipboardprint?
((System.Web.UI.UserControl)(this)).AppRelativeVirtualPath =
"~/cms/events/EventTable.ascx"; //Or whatever the physical location is ((System.Web.UI.UserControl)(this)).AppRelativeVirtualPath =
"~/cms/events/EventTable.ascx"; //Or whatever the physical location is
Application-relative paths can still be used, but are very fragile and sensitive to movement in the parent folder structure. Most paths (like images, css, slideshows, and videos) are best expressed in relative form. As a rule, use relative paths for related files.
I discovered this problem after I already had a series of controls written in .ascx form, so I e-mailed Scott Guthrie about the dilemma. He passed my e-mail on to Matt Gibbs, who was very helpful as always.
The behavior of .ascx files is actually by design - they aren't designed to have a resident filepath-agnostic mode. He also suggested placing an control right inside the tags to make .Parent work in that situation.
Since I already had several hundred content pages, I ended up rewriting most of my controls in App_Code instead. For a few controls I really wanted to keep in declarative markup, I used a hack to automatically change AppRelativeTemplateSourceDirectory. Even though I can't fix the TemplateControl structure, I can change the AppRelativeTemplateSourceDirectory to mimic the proper behavior.
view plaincopy to clipboardprint?
///
/// Set this to true if you externally set the AppRelativeTemplateSourceDirectory.
/// Otherwise, the externally set value will be ignored.
///

public bool LocationOverriden
{
get
{
return _LocationOverriden;
}
set
{
if (value)
if (!_LocationOverriden) _LocationOverriden = true;
}
}
protected override void OnLoad(EventArgs e)
{
if (!LocationOverriden) ImpersonateParentLocation();
base.OnLoad(e);
}
///
/// Retrieves the correct parent template control of the current template control
/// Doesn't support use within .master files, only content pages. Support for master pages could be added with more granular type checks.
///

public Control ParentTemplateControl
{
get
{
if (this.Parent != null)
if (this.Page != null)
{
if (this.Parent.TemplateControl == this.Page.Master)
return this.Page;
else
return this.Parent.TemplateControl;
}
return null;
}
}

///
/// Changes AppRelativeTemplateSourceDirectory to match the parent file, if it hasn't already been overriden.
/// Paths
///

public void ImpersonateParentLocation()
{
if (ParentTemplateControl != null)
this.AppRelativeTemplateSourceDirectory = ParentTemplateControl.AppRelativeTemplateSourceDirectory;
} ///
/// Set this to true if you externally set the AppRelativeTemplateSourceDirectory.
/// Otherwise, the externally set value will be ignored.
///
public bool LocationOverriden
{
get
{
return _LocationOverriden;
}
set
{
if (value)
if (!_LocationOverriden) _LocationOverriden = true;
}
}
protected override void OnLoad(EventArgs e)
{
if (!LocationOverriden) ImpersonateParentLocation();
base.OnLoad(e);
}
///
/// Retrieves the correct parent template control of the current template control
/// Doesn't support use within .master files, only content pages. Support for master pages could be added with more granular type checks.
///
public Control ParentTemplateControl
{
get
{
if (this.Parent != null)
if (this.Page != null)
{
if (this.Parent.TemplateControl == this.Page.Master)
return this.Page;
else
return this.Parent.TemplateControl;
}
return null;
}
}
///
/// Changes AppRelativeTemplateSourceDirectory to match the parent file, if it hasn't already been overriden.
/// Paths
///
public void ImpersonateParentLocation()
{
if (ParentTemplateControl != null)
this.AppRelativeTemplateSourceDirectory = ParentTemplateControl.AppRelativeTemplateSourceDirectory;
}
You are welcome to read (and vote for!) the Microsoft Connect issue

Div width not working in Mozilla

Div width not working in Mozilla: "Div width not working in Mozilla"

Friday, August 1, 2008

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.

Basic .NET and ASP.NET interview questions

Basic .NET and ASP.NET interview questions Fresher Interview Questions

Following are some Basic .NET and ASP.NET interview questions, answer them if you can or just read and get answers.1. Explain the .NET architecture.2. How many languages .NET is supporting now? - When .NET was introduced it came with several languages. VB.NET, C#, COBOL and Perl, etc. The site DotNetLanguages.Net says 44 languages are supported.3. How is .NET able to support multiple languages? - a language should comply with the Common Language Runtime standard to become a .NET language. In .NET, code is compiled to Microsoft Intermediate Language (MSIL for short). This is called as Managed Code. This Managed code is run in .NET environment. So after compilation to this IL the language is not a barrier. A code can call or use a function written in another language.4. How ASP .NET different from ASP? - Scripting is separated from the HTML, Code is compiled as a DLL, these DLLs can be executed on the server.5. Resource Files: How to use the resource files, how to know which language to use?6. What is smart navigation? - The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.7. What is view state? - The web is stateless. But in ASP.NET, the state of a page is maintained in the in the page itself automatically. How? The values are encrypted and saved in hidden controls. this is done automatically by the ASP.NET. This can be switched off / on for a single control8. Explain the life cycle of an ASP .NET page.9. How do you validate the controls in an ASP .NET page? - Using special validation controls that are meant for this. We have Range Validator, Email Validator.10. Can the validation be done in the server side? Or this can be done only in the Client side? - Client side is done by default. Server side validation is also possible. We can switch off the client side and server side can be done.11. How to manage pagination in a page? - Using pagination option in DataGrid control. We have to set the number of records for a page, then it takes care of pagination by itself.12. What is ADO .NET and what is difference between ADO and ADO.NET? - ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memory database where in I can use relationships between the tables and select insert and updates to the database. I can update the actual database as a batch.

Interview Questions: C#

Interview Questions: C#: "C# Interview Questions"
This is a list of questions I have gathered from other sources and created myself over a period of time from my experience, many of which I felt where incomplete or simply wrong. I have finally taken the time to go through each question and correct them to the best of my ability. However, please feel free to post feedback to challenge, improve, or suggest new questions. I want to thank those of you that have contributed quality questions and corrections thus far.
There are some question in this list that I do not consider to be good questions for an interview. However, they do exist on other lists available on the Internet so I felt compelled to keep them easy access.
General Questions
Does C# support multiple-inheritance? No.
Who is a protected class-level variable available to? It is available to any sub-class (a class inheriting this class).
Are private class-level variables inherited? Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited.
Describe the accessibility modifier “protected internal”. It is available to classes that are within the same assembly and derived from the specified base class.
What’s the top .NET class that everything is derived from? System.Object.
What does the term immutable mean?The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.
What’s the difference between System.String and System.Text.StringBuilder classes?System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.
What’s the advantage of using System.Text.StringBuilder over System.String?StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new instance in memory is created.
Can you store multiple data types in System.Array?No.
What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.
How can you sort the elements of the array in descending order?By calling Sort() and then Reverse() methods.
What’s the .NET collection class that allows an element to be accessed using a unique key?HashTable.
What class is underneath the SortedList class?A sorted HashTable.
Will the finally block get executed if an exception has not occurred?­Yes.
What’s the C# syntax to catch any possible exception?A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.
Can multiple catch blocks be executed for a single try statement?No. Once the proper catch block processed, control is transferred to the finally block (if there are any).
Explain the three services model commonly know as a three-tier application.Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).
Class Questions
What is the syntax to inherit from a class in C#? Place a colon and then the name of the base class.Example: class MyNewClass : MyBaseClass
Can you prevent your class from being inherited by another class? Yes. The keyword “sealed” will prevent the class from being inherited.
Can you allow a class to be inherited, but prevent the method from being over-ridden?Yes. Just leave the class public and make the method sealed.
What’s an abstract class?A class that cannot be instantiated. An abstract class is a class that must be inherited and have the methods overridden. An abstract class is essentially a blueprint for a class without any implementation.
When do you absolutely have to declare a class as abstract?1. When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden. 2. When at least one of the methods in the class is abstract.
What is an interface class?Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, interfaces do not provide implementation. They are implemented by classes, and defined as separate entities from classes.
Why can’t you specify the accessibility modifier for methods inside the interface?They all must be public, and are therefore public by default.
Can you inherit multiple interfaces?Yes. .NET does support multiple interfaces.
What happens if you inherit multiple interfaces and they have conflicting method names?It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you’re okay. To Do: Investigate
What’s the difference between an interface and abstract class?In an interface class, all methods are abstract - there is no implementation. In an abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed. An abstract class may have accessibility modifiers.
What is the difference between a Struct and a Class?Structs are value-type variables and are thus saved on the stack, additional overhead but faster retrieval. Another difference is that structs cannot inherit.
Method and Property Questions
What’s the implicit name of the parameter that gets passed into the set method/property of a class? Value. The data type of the value parameter is defined by whatever data type the property is declared as.
What does the keyword “virtual” declare for a method or property? The method or property can be overridden.
How is method overriding different from method overloading? When overriding a method, you change the behavior of the method for the derived class. Overloading a method simply involves having another method with the same name within the class.
Can you declare an override method to be static if the original method is not static? No. The signature of the virtual method must remain the same. (Note: Only the keyword virtual is changed to keyword override)
What are the different ways a method can be overloaded? Different parameter data types, different number of parameters, different order of parameters.
If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
Events and Delegates
What’s a delegate? A delegate object encapsulates a reference to a method.
What’s a multicast delegate? A delegate that has multiple handlers assigned to it. Each assigned handler (method) is called.
XML Documentation Questions
Is XML case-sensitive? Yes.
What’s the difference between // comments, /* */ comments and /// comments? Single-line comments, multi-line comments, and XML documentation comments.
How do you generate documentation from the C# file commented properly with a command-line compiler? Compile it with the /doc switch.
Debugging and Testing Questions
What debugging tools come with the .NET SDK?1. CorDBG – command-line debugger. To use CorDbg, you must compile the original C# file using the /debug switch. 2. DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR.
What does assert() method do? In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.
What’s the difference between the Debug class and Trace class? Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds.
Why are there five tracing levels in System.Diagnostics.TraceSwitcher? The tracing dumps can be quite verbose. For applications that are constantly running you run the risk of overloading the machine and the hard drive. Five levels range from None to Verbose, allowing you to fine-tune the tracing activities.
Where is the output of TextWriterTraceListener redirected? To the Console or a text file depending on the parameter passed to the constructor.
How do you debug an ASP.NET Web application? Attach the aspnet_wp.exe process to the DbgClr debugger.
What are three test cases you should go through in unit testing? 1. Positive test cases (correct data, correct output).2. Negative test cases (broken or missing data, proper handling).3. Exception test cases (exceptions are thrown and caught properly).
Can you change the value of a variable while debugging a C# application? Yes. If you are debugging via Visual Studio.NET, just go to Immediate window.
ADO.NET and Database Questions
What is the role of the DataReader class in ADO.NET connections? It returns a read-only, forward-only rowset from the data source. A DataReader provides fast access when a forward-only sequential read is needed.
What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET? SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix. OLE-DB.NET is a .NET layer on top of the OLE layer, so it’s not as fastest and efficient as SqlServer.NET.
What is the wildcard character in SQL? Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve ‘La%’.
Explain ACID rule of thumb for transactions.A transaction must be:1. Atomic - it is one unit of work and does not dependent on previous and following transactions.2. Consistent - data is either committed or roll back, no “in-between” case where something has been updated and something hasn’t.3. Isolated - no transaction sees the intermediate results of the current transaction).4. Durable - the values persist if the data had been committed even if the system crashes right after.
What connections does Microsoft SQL Server support? Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and password).
Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is untrusted? Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.
What does the Initial Catalog parameter define in the connection string? The database name to connect to.
What does the Dispose method do with the connection object? Deletes it from the memory.To Do: answer better. The current answer is not entirely correct.
What is a pre-requisite for connection pooling? Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings. The connection string must be identical.
Assembly Questions
How is the DLL Hell problem solved in .NET? Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly.
What are the ways to deploy an assembly? An MSI installer, a CAB archive, and XCOPY command.
What is a satellite assembly? When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.
What namespaces are necessary to create a localized application? System.Globalization and System.Resources.
What is the smallest unit of execution in .NET?an Assembly.
When should you call the garbage collector in .NET?As a good rule, you should not call the garbage collector. However, you could call the garbage collector when you are done using a large object (or set of objects) to force the garbage collector to dispose of those very large objects from memory. However, this is usually not a good practice.
How do you convert a value-type to a reference-type?Use Boxing.
What happens in memory when you Box and Unbox a value-type?Boxing converts a value-type to a reference-type, thus storing the object on the heap. Unboxing converts a reference-type to a value-type, thus storing the value on the stack.

RUNUBE - JD Edwards Run Programs from Web page

JD Edwards Run Programs from Web page