Monday, March 30, 2009

SQL Adapter – Generating a Schema

When using the Stored Procedures in SQL Server and BizTalk, we need to add the XSD to the project.  When using the Add Adpater MetaData feature of BizTalk (Add –> Add Generated Items…) BizTalk generates the schema, but the result is equal to the Success element and is of atype  AnyType.

This behavior is not the one we want as we want to use the return values.

Solution:

1. First create the Store Procedure
    ex. SELECT Id, Name FROM Countries FOR XML AUTO, XMLDATA

   Be sure to add FOR XML AUTO, XMLDATA at the end.

2. Run the Add Adapter MetaData wizard, within Visual Studio and your   
    BizTalk Project.

3. At the Statement Information screen, you need to enter valid values
    into the Value column

4. Click the Generate button

5 Finish the Wizard, you will see that now the XSD will contain the

   structured results and not anymore the AnyType element.

6.  After the XSD is generate, remove the XMLDATA clause from the
     Stored Procedure;
    ex. SELECT Id, Name FRO Countries FOR XML AUTO

Wednesday, March 25, 2009

FileUpload control within an Update Panel

The FileUpload control is not working within the Update Panel control, but there is a workaround:

Add the following code to the Page_Load event of your page:

ScriptManager.GetCurrent(Page).RegisterPostBackControl(cmdUploadPicture);

Where cmdUploadPicture the ID of button is, used to Upload the File.

Tuesday, March 24, 2009

Cascading Drop downs in InfoPath Web Forms made easy

To create user‐friendly web forms, cascading drop down list boxes is a must, but InfoPath Form Services doesn’t allow you to use them, like you can use them with InfoPath Client.
(Filter Data on DataConnections/DataSources are not allowed with InfoPath Web Forms)

This article explains how to use Cascading


http://www.silversandsassociates.com/HOW_TO_use_Cascading_Dropdown_ListBoxes_within_an_InfoPath_Web_Form.pdf

(Silversands Associates is very happy that already hundreds of companies used this article to get cascading dropdown list boxes into there web based InfoPath forms)

10 Rare HTML Tags You Really Should Know

When working in IT, we often come across the good old HTML.  I found a very interesting article about rare HTML tags, written by Glen Stansberry.

http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/