I’m back
I think
Introduction to Expression Web
This tutorial is for people starting out with Microsoft Expression Web 2. It is aimed at users that have never used Expression Web or any other web development software. I originally created it for one of my classes at the University of Oregon. The tutorial covers how to create your first page, how to upload that page to a web server using FrontPage Server Extensions, how to do basic formatting, how to add a title and meta tags, and how to insert an image. I will be adding more tutorials soon that cover CSS and ASP.NET. Please follow the link below.
Tutorial – Introduction to Microsoft Expression Web
Inserting a PayPal Buy Now Button into an ASP.NET Form
When working with ASP.NET pages, one difficulty that often arises is that you need two forms on the page – the normal form required by ASP.NET and a second form for something else such as a PayPal button or a search tool. The solution that I discovered is to not have two forms but simply have one form (the normal one in the master page). It usually only requires some minor changes to the controls in the 2nd form for it to work. For example, here is the adjusted code for a PayPal Buy Now button:
<input type=”hidden” name=”cmd” value=”_xclick” />
<input type=”hidden” name=”business” value=”gcastner@asianfoods.com” />
<input type=”hidden” name=”item_name” value=”Sweet and sour sauce”/>
<input type=”hidden” name=”item_number” value=”SAUCE001″ />
<input type=”hidden” name=”amount” value=”100.00″ />
<input type=”hidden” name=”no_shipping” value=”2″ />
<input type=”hidden” name=”no_note” value=”1″ />
<input type=”hidden” name=”currency_code” value=”USD” />
<input type=”hidden” name=”lc” value=”US” />
<input type=”hidden” name=”bn” value=”PP-BuyNowBF” />
<img alt=”" style=’border:0px;’ src=’https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif” width=”1″ height=”1″ />
<asp:Button ID=”Button2″ runat=”server” Text=”Button” PostBackUrl=”https://www.sandbox.paypal.com/cgi-bin/webscr” />
The main changes from the PayPal supplied code are the removal of the form tags and the inclusion of the asp:button. The reason for the change is that because ASP.NET pages are already web forms, we cannot simply add a 2nd form into the page (it would cause an error).
Another useful thing is that you can set the default button for the page, or different parts of the page. This example sets the default button when someone presses enter to the login button rather than the search button at the top of the page. You need to enclose the relevant controls in a panel control.
Protected Sub panelLogin_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles panelLogin.Load
Page.Form.DefaultFocus = Login1.FindControl(“UserName”).UniqueID
Page.Form.DefaultButton = Login1.FindControl(“LoginButton”).UniqueID
End Sub
Changing default language in Office 2007
I recently moved back to Australia from the USA and had plenty of fun
trying to change all of my defaults from USA to Australia. Here is a list of things to check whenever you are changing countries:
1. Microsoft Vista: Control Panel –> Clock, Language, and Region –> Change the country or region
and Control Panel –> Clock, Language, and Region –> Change the date, time, or number format
2. Time Zone: Click on the time –> Change Time Zone
3. For Microsoft Office 2007: All Programs –> Microsoft Office –> Microsoft Office Tools –> Microsoft Office 2007 Language
Microsoft reporting: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
This error was bugging
me for a long time until I found this excellent forum discussion:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=541116&SiteId=1
The following points summarize the causes and solutions from the forum and offer some additional help:
1. Check if you have changed the length of any fields in the underlying database table after creating the dataset. If you have, you may need to manually change them in the dataset as well. If you are using Visual Studio 2008, open the xsd file and click on the relevant field name. Ensure the maxlength property matches your new field length.
2. If you base your dataset off a view rather than a table, and that view contains a primary key field from the underlying table, visual studio may set unique to true for that field. If your view is constructed in such a way that the field is not unique, then the error will occur. In Visual Studio 2008, open the xsd file, click on the field and set unique to false in properties.
There were other causes of the error but these seemed to be the two most common.
Cheers,
Grant

