Monday, April 30, 2007

JDE Batch File - Order Transfer to Warehouse

Order Transfer to Warehouse
.BAT File
cd\
cd batfltrn
REM del R554268IT_DSM*.csv
move c:\batfltrn\R554268IT_DSM*.csv c:\batfltrn\backup
cd\
xcopy i:\PeopleSoft\ddp\e810\PrintQueue\R554268IT_DSM*.csv c:\batfltrn /d/m
ftp -s:c:/batfltrn/ccftp.txt




FILE Name: ccftp.txt

ftp
open xxxx.yyyyy.com (FTP Information)
zzzzzzz (User ID)
xxxxxx (Password)
cd in
lcd c:\batfltrn
binary
prompt n
mput R554268IT_ZJDE000*.CSV
quit


www.svdeals.com super value deals

MS-DOS move command help

MS-DOS move command help: "MOVE"


move c:\windows\temp\*.* c:\temp





www.svdeals.com super value deals

Saturday, April 28, 2007

FTP Error: 500 Invalid PORT Command

FTP Error: 500 Invalid PORT Command: "FTP Error: 500 Invalid PORT Command"

Tutorial 12: Using TemplateFields in the GridView Control

Tutorial 12: Using TemplateFields in the GridView Control: "Using TemplateFields in the GridView Control"

ASPdotNet Training
Tutorial 12: Using TemplateFields in the GridView Control

Scott Mitchell
February 2007
Download the code for this sample.
Contents of Tutorial 12 (Visual C#)
IntroductionStep 1: Binding the Data to the GridViewStep 2: Displaying the First and Last Names in a Single ColumnStep 3: Using the Calendar Control to Display the HireDate FieldStep 4: Showing the Number of Days the Employee Has Worked for the CompanyConclusionAbout the AuthorSpecial Thanks
Introduction
The GridView is composed of a set of fields that indicate what properties from the DataSource are to be included in the rendered output along with how the data will be displayed. The simplest field type is the BoundField, which displays a data value as text. Other field types display the data using alternate HTML elements. The CheckBoxField, for example, renders as a check box whose checked state depends on the value of a specified data field; the ImageField renders an image whose image source is based upon a specified data field. Hyperlinks and buttons whose state depends on an underlying data-field value can be rendered using the HyperLinkField and ButtonField field types, respectively.
While the CheckBoxField, ImageField, HyperLinkField, and ButtonField field types allow for an alternate view of the data, they still are fairly limited with respect to formatting. A CheckBoxField can display only a single check box, whereas an ImageField can display only a single image. What if a particular field must display some text, a check box, and an image, all based upon different data-field values? Or what if we wanted to display the data using a Web control other than the CheckBox, Image, HyperLink, or Button? Furthermore, the BoundField limits its display to a single data field. What if we wanted to show two or more data-field values in a single GridView column?
To accommodate this level of flexibility, the GridView offers the TemplateField, which renders using a template. A template can include a mix of static HTML, Web controls, and data-binding syntax. Furthermore, the TemplateField has a variety of templates that can be used to customize the rendering for different situations. For example, the ItemTemplate is used by default to render the cell for each row, but the EditItemTemplate template can be used to customize the interface when editing data.
In this tutorial, we'll examine how to use the TemplateField to achieve a greater degree of customization with the GridView control. In the preceding tutorial, we saw how to customize the formatting based on the underlying data using the DataBound and RowDataBound event handlers. Another way to customize the formatting based on the underlying data is by calling formatting methods from within a template. We'll look at this technique in this tutorial, too.
For this tutorial, we will use TemplateFields to customize the appearance of a list of employees. Specifically, we'll list all of the employees, but will display the employee's first and last names in one column, their hire dates in a Calendar control, and a status column that indicates how many days they've been employed at the company.

Figure 1. Three TemplateFields are used to customize the display. (Click on the picture for a larger image.)
Step 1: Binding the Data to the GridView
In reporting scenarios in which you must use TemplateFields to customize the appearance, I find it easier to start by creating a GridView control that contains just BoundFields first, and then add new TemplateFields or convert the existing BoundFields to TemplateFields, as needed. Therefore, let's start this tutorial by adding a GridView to the page through the Designer and binding it to an ObjectDataSource that returns the list of employees. These steps will create a GridView with a BoundField for each of the employee fields.
Open the GridViewTemplateField.aspx page, and drag a GridView from the Toolbox onto the Designer. From the GridView's smart tag, choose to add a new ObjectDataSource control that invokes the GetEmployees() method of the EmployeesBLL class.

Figure 2. Add a new ObjectDataSource control that invokes the GetEmployees() method. (Click on the picture for a larger image.)
Binding the GridView in this manner will automatically add a BoundField for each of the employee properties: EmployeeID, LastName, FirstName, Title, HireDate, ReportsTo, and Country. For this report, let's not bother with displaying the EmployeeID, ReportsTo, or Country property. To remove these BoundFields, you can:
Use the Fields dialog box. Click on the Edit Columns link from the GridView's smart tag to bring up this dialog box. Next, select the BoundFields from the lower-left list, and click the red X button to remove the BoundField.
Edit the GridView's declarative syntax by hand. From the Source view, delete the element for the BoundField that you want to remove.
After you have removed the BoundFields named EmployeeID, ReportsTo, and Country, your GridView's markup should look like the following:
Copy Code







Take a moment to view our progress in a browser. At this point, you should see a table with a record for each employee and four columns: one each for the employee's last name, first name, title, and hire date.

Figure 3. The LastName, FirstName, Title, and HireDate fields are displayed for each employee. (Click on the picture for a larger image.)
Step 2: Displaying the First and Last Names in a Single Column
Currently, each employee's first and last names are displayed in a separate column. It might be nice to combine them into a single column, instead. To accomplish this, we must use a TemplateField. We can either add a new TemplateField, add to it the needed markup and data-binding syntax, and then delete the BoundFields named FirstName and LastName, or we can convert the BoundFields named FirstName into a TemplateField, edit the TemplateField to include the LastName value, and then remove the BoundField named LastName.
Both approaches net the same result, but personally I like converting BoundFields to TemplateFields, when possible, because the conversion automatically adds an ItemTemplate and EditItemTemplate with Web controls and data-binding syntax to mimic the appearance and functionality of the BoundField. The benefit is that we'll need to do less work with the TemplateField, as the conversion process will have performed some of the work for us.
To convert an existing BoundField into a TemplateField, click on the Edit Columns link from the GridView's smart tag, which brings up the Fields dialog box. Select the BoundField to convert from the list in the lower-left corner, and then click the Convert this field into a TemplateField link in the bottom-right corner.

Figure 4. Convert a BoundField into a TemplateField from the Fields dialog box. (Click on the picture for a larger image.)
Go ahead and convert the BoundField named FirstName into a TemplateField. After this change, there's no perceptive difference in the Designer. This is because converting the BoundField into a TemplateField creates a TemplateField that maintains the look and feel of the BoundField. Despite there being no visual difference at this point in the Designer, this conversion process has replaced the BoundField's declarative syntax——with the following TemplateField syntax:
Copy Code

'>


'>


As you can see, the TemplateField consists of two templates: an ItemTemplate that has a Label whose Text property is set to the value of the FirstName data field, and an EditItemTemplate that has a TextBox control whose Text property also is set to the FirstName data field. The data-binding syntax—<%# Bind("fieldName") %>—indicates that the fieldName data field is bound to the specified Web control property.
To add the LastName data-field value to this TemplateField, we must add another Label Web control in the ItemTemplate and bind its Text property to LastName. This can be accomplished either by hand or through the Designer. To do it by hand, just add the appropriate declarative syntax to the ItemTemplate:
Copy Code

'>


'>
'>


To add it through the Designer, click on the Edit Templates link from the GridView's smart tag. This will display the GridView's template-editing interface. In this interface's smart tag is a list of the templates in the GridView. Because we have only one TemplateField at this point, the only templates listed in the drop-down list are those templates for the FirstName TemplateField, along with the EmptyDataTemplate and PagerTemplate. The EmptyDataTemplate template, if specified, is used to render the GridView's output if there are no results in the data bound to the GridView; the PagerTemplate, if specified, is used to render the paging interface for a GridView that supports paging.

Figure 5. The GridView's templates can be edited through the Designer. (Click on the picture for a larger image.)
To display also the LastName in the FirstName TemplateField, drag the Label control from the Toolbox into the ItemTemplate of the FirstName TemplateField in the GridView's template-editing interface.

Figure 6. Add a Label Web control to the FirstName TemplateField's ItemTemplate. (Click on the picture for a larger image.)
At this point, the Label Web control added to the TemplateField has its Text property set to Label. We must change this, so that this property is bound to the value of the LastName data field, instead. To accomplish this, click on the Label control's smart tag and choose the Edit DataBindings option.

Figure 7. Choose the Edit DataBindings option from the Label's smart tag. (Click on the picture for a larger image.)
This will bring up the DataBindings dialog box. From here, you can select the property to participate in data binding from the list on the left, and, from the drop-down list on the right, choose the field to which to bind the data. Choose the Text property from the left and the LastName field from the right, and click OK.

Figure 8. Bind the Text property to the LastName data field. (Click on the picture for a larger image.)
Note The DataBindings dialog box allows you to indicate whether to perform two-way data binding. If you leave this unchecked, the data-binding syntax <%# Eval("LastName")%>will be used, instead of <%# Bind("LastName")%>. Either approach is fine for this tutorial. Two-way data binding becomes important when inserting and editing data. For just displaying data, however, either approach will work equally well. We'll discuss two-way data binding in detail, in future tutorials.
Take a moment to view this page through a browser. As you can see, the GridView still includes four columns; however, the FirstName column now lists both the FirstName and LastName data-field values.

Figure 9. Both the FirstName and LastName values are shown in a single column. (Click on the picture for a larger image.)
To complete this first step, remove the LastName BoundField, and rename the HeaderText property of the FirstName TemplateField to "Name". After these changes, the GridView's declarative markup should look like the following:
Copy Code



'>


'>
'>







Figure 10. Each employee's first and last names are displayed in one column. (Click on the picture for a larger image.)
Step 3: Using the Calendar Control to Display the HireDate Field
Displaying a data-field value as text in a GridView is as easy as using a BoundField. For certain scenarios, however, the data is best expressed using a particular Web control instead of just text. Such customization of the display of data is possible with a TemplateField. For example, instead of displaying the employee's hire date as text, we could show a Calendar (using the Calendar control) with the employee's hire date highlighted.
To accomplish this, start by converting the BoundField named HireDate into a TemplateField. Just go to the GridView's smart tag and click the Edit Columns link, which brings up the Fields dialog box. Select the BoundField named HireDate, and click Convert this field into a TemplateField.

Figure 11. Convert the HireDate BoundField into a TemplateField. (Click on the picture for a larger image.)
As we saw in step 2, this will replace the BoundField with a TemplateField that contains an ItemTemplate and EditItemTemplate with a Label and TextBox whose Text properties are bound to the HireDate value using the data-binding syntax <%# Bind("HireDate")%>.
To replace the text with a Calendar control, edit the template by removing the Label and adding a Calendar control. From the Designer, select Edit Templates from the GridView's smart tag and, from the drop-down list, choose the ItemTemplate of the HireDate TemplateField. Next, delete the Label control, and drag a Calendar control from the Toolbox into the template-editing interface.

Figure 12. Add a Calendar control to the HireDate TemplateField's ItemTemplate. (Click on the picture for a larger image.)
At this point, each row in the GridView will contain a Calendar control in its HireDate TemplateField. However, the employee's actual HireDate value is not set anywhere in the Calendar control, which causes each Calendar control to default to showing the current month and date. To remedy this, we must assign each employee's HireDate to the Calendar control's SelectedDate and VisibleDate properties.
From the Calendar control's smart tag, choose Edit DataBindings. Next, bind both the SelectedDate and VisibleDate properties to the HireDate data field.

Figure 13. Bind the SelectedDate and VisibleDate properties to the HireDate data field. (Click on the picture for a larger image.)
Note The Calendar control's selected date does not necessarily have to be visible. For example, a Calendar might have August 1, 1999, as the selected date, but be showing the current month and year. The selected date and visible date are specified by the Calendar control's SelectedDate and VisibleDate properties. Because we want to both select the employee's HireDate and make sure that it's shown, we must bind both of these properties to the HireDate data field.
When viewing the page in a browser, the Calendar now shows the month of the employee's hired date and selects that particular date.

Figure 14. The employee's HireDate is shown in the Calendar control. (Click on the picture for a larger image.)
Note Contrary to all the examples we've seen thus far, for this tutorial we did not set the EnableViewState property to false for this GridView. The reason for this decision is that clicking the dates of the Calendar control causes a post-back, setting the Calendar's selected date to the date just clicked. If the GridView's view state is disabled, however, on each post-back, the GridView's data is rebound to its underlying data source, which causes the Calendar's selected date to be set back to the employee's HireDate, overwriting the date chosen by the user.
For this tutorial, this is a moot discussion, because the user is not able to update the employee's HireDate. It would probably be best to configure the Calendar control, so that its dates are not selectable. Either way, this tutorial shows that in some circumstances, view state must be enabled in order to provide certain functionality.
Step 4: Showing the Number of Days the Employee Has Worked for the Company
So far, we have seen two applications of TemplateFields:
Combining two or more data-field values into one column
Expressing a data-field value using a Web control instead of text
A third use of TemplateFields is in displaying metadata about the GridView's underlying data. In addition to showing the employees' hire dates, for example, we might also want to have a column that displays how many total days they've been on the job.
Yet another use of TemplateFields arises in scenarios in which the underlying data must be displayed differently in the Web page report from the format in which it's stored in the database. Imagine that the Employees table had a Gender field that stored the character M or F to indicate the gender of the employee. When displaying this information in a Web page, we might want to show the gender as either "Male" or "Female", as opposed to just "M" or "F".
Both of these scenarios can be handled by creating a formatting method in the ASP.NET page's code-behind class (or in a separate class library, implemented as a static method) that is invoked from the template. Such a formatting method is invoked from the template using the same data-binding syntax seen earlier. The formatting method can take in any number of parameters, but must return a string. This returned string is the HTML that is injected into the template.
To illustrate this concept, let's augment our tutorial to show a column that lists the total number of days an employee has been on the job. This formatting method will take in a Northwind.EmployeesRow object and return as a string the number of days that the employee has been employed. This method can be added to the ASP.NET page's code-behind class, but must be marked as protected or public in order to be accessible from the template.
Copy Codeprotected string DisplayDaysOnJob(Northwind.EmployeesRow employee)
{
// Make sure HireDate is not null... if so, return "Unknown"
if (employee.IsHireDateNull())
return "Unknown";
else
{
// Returns the number of days between the current
// date/time and HireDate
TimeSpan ts = DateTime.Now.Subtract(employee.HireDate);
return ts.Days.ToString("#,##0");
}
}
Because the HireDate field can contain NULL database values, we must first ensure that the value is not NULL before proceeding with the calculation. If the HireDate value is NULL, we just return the string "Unknown"; if it is not NULL, we compute the difference between the current time and the HireDate value, and return the number of days.
To utilize this method, we must invoke it from a TemplateField in the GridView using the data-binding syntax. Start by adding a new TemplateField to the GridView by clicking on the Edit Columns link in the GridView's smart tag and adding a new TemplateField.

Figure 15. Add a New TemplateField to the GridView. (Click on the picture for a larger image.)
Set the HeaderText property of this new TemplateField to Days on the Job and the HorizontalAlign property of its ItemStyle to Center. To call the DisplayDaysOnJob method from the template, add an ItemTemplate and use the following data-binding syntax:
Copy Code<%# DisplayDaysOnJob((Northwind.EmployeesRow) (System.Data.DataRowView) Container.DataItem).Row) %>
Container.DataItem returns a DataRowView object that corresponds to the DataSource record bound to the GridViewRow. Its Row property returns the strongly typed Northwind.EmployeesRow, which is passed to the DisplayDaysOnJob method. This data-binding syntax can appear directly in the ItemTemplate (as shown in the declarative syntax that follows) or it can be assigned to the Text property of a Label Web control.
Note Alternatively, instead of passing in an EmployeesRow instance, we could just pass in the HireDate value using <%# DisplayDaysOnJob(Eval("HireDate")) %>. However, the Eval method returns an object, so we would have to change our DisplayDaysOnJob method signature to accept an input parameter of type object, instead. We can't blindly cast the Eval("HireDate") call to a DateTime, because the HireDate column in the Employees table can contain NULL values. Therefore, we would have to accept an object as the input parameter for the DisplayDaysOnJob method, check to see if it had a database NULL value (which can be accomplished by using Convert.IsDBNull(objectToCheck)), and then proceed accordingly.
Because of these subtleties, I've opted to pass in the entire EmployeesRow instance. In the next tutorial we'll see a more fitting example for using the Eval("columnName") syntax for passing an input parameter into a formatting method.
The following shows the declarative syntax for our GridView after the TemplateField has been added and the DisplayDaysOnJob method called from the ItemTemplate:
Copy Code



'>


'>
'>





'>


'>VisibleDate='<%# Eval("HireDate") %>'>





<%# DisplayDaysOnJob((Northwind.EmployeesRow)((System.Data.DataRowView) Container.DataItem).Row) %>





Figure 16 shows the completed tutorial, when viewed through a browser.

Figure 16. Number of days employee has been on the job (Click on the picture for a larger image)
Conclusion
The TemplateField in the GridView control allows for a higher degree of flexibility in displaying data than is available with the other field controls. A TemplateField is ideal for situations in which:
Multiple data fields must be displayed in one GridView column.
The data is best expressed using a Web control, instead of plain text.
The output depends on the underlying data, such as displaying metadata or in reformatting the data.
In addition to customizing the display of data, a TemplateField is used also for customizing the user interfaces used for editing and inserting data, as we'll see in future tutorials.
The next two tutorials continue exploring templates, starting with a look at using TemplateFields in a DetailsView. Following that, we'll turn to the FormView, which uses templates instead of fields to provide greater flexibility in the layout and structure of the data.
Happy programming!
About the Author
Scott Mitchell, author of six ASP/ASP.NET books and founder of 4GuysFromRolla.com, has been working with Microsoft Web technologies since 1998. Scott works as an independent consultant, trainer, and writer, and he recently completed his latest book, Sams Teach Yourself ASP.NET 2.0 in 24 Hours. He can be reached at mitchell@4guysfromrolla.com or via his blog, which can be found at http://scottonwriting.net/.
Special Thanks
This tutorial series was reviewed by many helpful reviewers. Lead reviewer for this tutorial was Dan Jagers. Interested in reviewing my upcoming MSDN articles? If so, drop me a line at mitchell@4GuysFromRolla.com.

Friday, April 27, 2007

How to Shrink an Image Using MS Paint and Word | eHow.com

How to Shrink an Image Using MS Paint and Word eHow.com: "How to Shrink an Image Using MS Paint and Word"

JD Edwards On Hand Qty. based on company & branch plant

drop table jde_rk।dbo।item_det_1select mcco,abat1,aban8,abalph,abeftb,liitm,limcu,sum(lipqoh) lipqoh,sum(LIPQOH-(LIPBCK+LIPREQ+LIQWBO+LIOT1P+LIOT2P+LIOT1A+LIHCOM+LIPCOM+LIFCOM+LIFUN1+LIQOWO+LIQTTR+LIQTIN+LIQONL+LIQTRI+LIQTRO+LIQTY1+LIQTY2)) QtyAval into jde_rk।dbo।item_det_1from proddta.f41021 left outer join proddta.f0006 on limcu=mcmculeft outer join proddta.f41001 on cimcu=limculeft outer join proddta.f0101 on cian8=aban8--left outer join proddta.f4105 on cian8=aban8where mcco =505 and lipqoh<>0group by mcco,abat1,aban8,liitm,limcu,abalph,abeftb







drop table jde_rk.dbo.item_det_2select a.*,imlitm,imaitm,imdsc1,aladd1,aladd2,alcty1,aladds,aladdz,alctr,councs/10000 Cost_02,(lipqoh*councs/10000) ExtCostinto jde_rk.dbo.item_det_2 from jde_rk.dbo.item_det_1 a left outer join proddta.f4101 on liitm=imitmleft outer join proddta.f4105 on liitm=coitm and limcu=comcu and coledg='02'left outer join proddta.f0116 on aban8=alan8 and abeftb=aleftbwhere coledg='02'
select* from jde_rk.dbo.item_det_2


www.svdeals.com super value deals

Thursday, April 26, 2007

WWW FAQs: How do I create a border around the browser window?

WWW FAQs: How do I create a border around the browser window?: "WWW FAQs: How do I create a border around the browser window?"


www.svdeals.com super value deals

FTP Command Line Syntax

Rob van der Woude's Scripting pages: Batch Files for DOS, Windows (all flavours) and OS/2; Rexx; HTML; JavaScript: "FTP"

FTP -s:ftpscript.txt



WWW.SVDEALS.COM SUPER VALUE DEALS.

DOS Rem Definition

DOS Rem Definition: "Definition of: DOS Rem "

A Rem statement is used to place comments in a DOS batch file or the CONFIG.SYS file to remind the user of something. For example, the following line is for documentation purposes only:rem the following driver activates the mouse
device=mouse.sys
You can bypass any command in the file by adding REM at the beginning of the line. In the following example, MOUSE.SYS will not be loaded:device=mouse.sys command activated
rem device=mouse.sys command not activated



www.svdeals.com super value deals

MS-DOS xcopy command help

MS-DOS xcopy command help: "Windows 2000 and XP xcopy syntax"

XCOPY source [destination] [/A /M] [/D[:date]] [/P] [/S [/E]] [/W] [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U] [/K] [/N]




www.svdeals.com super value deals

FTP Tutorial

FTP Tutorial


www.svdeals.com super value deals

Monday, April 23, 2007

O'Reilly -- Microsoft .NET vs. J2EE: How Do They Stack Up?

O'Reilly -- Microsoft .NET vs. J2EE: How Do They Stack Up?: "Microsoft .NET vs. J2EE: How Do They Stack Up?"

J2EE project dangers! - Java World

J2EE project dangers! - Java World: "J2EE project dangers!"

J2EE project dangers!
Avoid these 10 J2EE dangers to ensure your enterprise Java project's success
By Humphrey Sheil, JavaWorld.com, 03/30/01In my various tenures as developer, senior developer, and architect, I have seen the good, the bad, and the ugly when it comes to enterprise Java projects! When I ask myself what makes one project succeed and another fail, it is difficult to come up with the perfect answer, as success proves difficult to define for all software projects. J2EE projects are no exception. Instead, projects succeed or fail by varying degrees. In this article I aim to take the top 10 dangers that affect the success of an enterprise Java project and showcase them for you, the reader.
Some of these dangers simply slow down the project, some are false trails, and still others can outright ruin any chance of success. However, all are avoidable with good preparation, knowledge about the journey ahead, and local guides who know the terrain.
This article is simple in structure; I will cover each hazard as follows:
Danger name: One-liner outlining the hazard
Project phase: The project phase where the hazard occurs
Project phase(s) affected: In a lot of cases, hazards can have a knock-on effect on later project phases
Symptoms: Symptoms associated with this hazard
Solution: Ways to avoid the hazard altogether and how to minimize its effects on your project
Notes: Points I wish to impart that relate to the hazard, but don't fit into the previous categories
As noted above, we'll examine each danger in the context of an enterprise Java project, along with its important phases. The project phases cover:
Vendor Selection: The process of picking the best possible mix of tools before you start your J2EE project -- from the application server right down to your brand of coffee.
Design: In between a rigorous waterfall methodology and an approach of "code it and see," lies my take on design: I do enough design so that I can move comfortably into development. I consider my design phase complete when I know exactly what I am building and how I will build it. Moreover, I use design templates to make sure I have asked all the right questions of myself and my proposed solution before moving into development. However, I'm not afraid to code in this phase; sometimes it's the only way to answer a question on say, performance or modularity.
Development: The project phase where the amount of work done in earlier phases will show. A good choice of tools coupled with a good design doesn't always mean a super-smooth development, but it sure helps!
Stabilization/Load Testing: In this phase, the system architect and project manager will impose a feature freeze and focus on build quality, as well as ensure that the system's vital statistics -- number of concurrent users, failover scenarios, and so on -- can be met. However, quality and performance should not be ignored until this phase. Indeed, you can't write poor-quality or slow code and leave it until stabilization to fix.
Live: This is not really a project phase, it's a date set in stone. This phase is all about preparation. It's where the ghosts of past mistakes will come back to haunt your project, from bad design and development to a poor choice of vendors.
Figure 1 illustrates the project phases most affected by the different causes (and in particular the knock-on effects).

Figure 1. Enterprise Java project phasesand their most likely reasons for failure.Click on thumbnail to view full-sizeimage. (60 KB)
Well then, without further ado, let's dive right into the top 10!
Danger 1: Not understanding Java, not understanding EJB, not understanding J2EE
Right, I'm going to break this one into three subelements for easier analysis.
Description: Not understanding Java
Project phase:Development
Project phase(s) affected:Design, Stabilization, Live
System characteristics affected:Maintainability, scalability, performance
Symptoms:
Reimplementing functionality and classes already contained in the JDK core APIs
Not knowing what any or all of the following are and what they do (this list represents just a sample of topics):
Garbage collector (train, generational, incremental, synchronous, asynchronous)
When objects can be garbage collected -- dangling references
Inheritance mechanisms used (and their tradeoffs) in Java
Method over-riding and over-loading
Why java.lang.String (substitute your favorite class here!) proves bad for performance
Pass-by reference semantics of Java (versus pass-by value semantics in EJB)
Using == versus implementing the equals() method for nonprimitives
How Java schedules threads on different platforms (for example, pre-emptive or not)
Green threads versus native threads
Hotspot (and why old performance tuning techniques negate Hotspot optimizations)
The JIT and when good JITs go bad (unset JAVA_COMPILER and your code runs just fine, etc.)
The Collections API
RMI
Solution:You need to improve your knowledge of Java, especially its strengths and weaknesses. Java exists far beyond just the language. It's equally important to understand the platform (JDK and tools). Concretely, you should become certified as a Java programmer if you aren't already -- you'll be amazed how much you didn't know. Even better, do it as part of a group and push one another. It's also more fun this way. Further, set up a mailing list devoted to Java technology and keep it going! (Every company I have worked with has these lists, most of which are on life-support due to inactivity.) Learn from your peer developers -- they're your best resource.
Notes:If you or other members of your team do not understand the programming language and the platform, how can you hope to build a successful enterprise Java application? Strong Java programmers take to EJB and the J2EE like ducks to water. In contrast, poor or inexperienced programmers will construct poor-quality J2EE applications.
Description: Not understanding EJB
Project phase:Design
Project phase(s) affected:Development, Stabilization
System characteristics affected:Maintenance
Symptoms:
EJBs that work when they are first called but never thereafter (especially stateless session beans that are returned to the ready pool)
Nonreusable EJBs
Not knowing for what the developer is responsible, compared with what the container provides
EJBs that do not correspond to the specification (fire threads, load native libraries, attempt to perform I/O, and so on)
Solution:
To improve your EJB knowledge, take a weekend and read the EJB specification (the 1.1 version is 314 pages long). Then read the 2.0 specification (524 pages!) to get a feel for what the 1.1 specification didn't address and where the 2.0 specification will take you. Concentrate on the parts of the specification that tell you, the application developer, what are legal actions in an EJB. Sections 18.1 and 18.2 are good places to start.
Notes:
Don't look at the EJB world through your vendor's eyes. Make sure you know the difference between the specifications underpinning the EJB model and a particular take on them. This will also ensure that you can transfer your skills to other vendors (or versions) as needed.
Description: Not understanding J2EE
Project phase:Design
Project phase(s) affected:Development
System characteristics affected:Maintenance, scalability, performance
Symptoms:
The "Everything is an EJB" design
Manual transaction management instead of using the container-provided mechanisms
Custom security implementations -- the J2EE platform has probably the most complete and integrated security architecture in enterprise computing, from presentation right through to the back end; it is rarely used to its full capabilities
Solution:
Learn J2EE's key components and what advantages and disadvantages each component brings to the table. Cover each service in turn; knowledge equals power here.
Notes:
Only knowledge can fix these problems. Good Java developers make good EJB developers, who in turn are ideally positioned to become J2EE gurus. The more Java and J2EE knowledge you possess, the better you will be at design and implementation. Things will start to slot into place for you at design time.
Danger 2: Over-engineering (to EJB or not to EJB)
Project phase:Design
Project phase(s) affected:Development
System characteristics affected:Maintenance, scalability, performance
Symptoms:
Oversized EJBs
Developers who can't explain what their EJBs do and the relationships among them
Nonreusable EJBs, components, or services when they should be
EJBs starting new transactions when an existing transaction will do
Data isolation levels set too high (in an attempt to be safe)
Solution:The solution for over-engineering comes straight from the extreme programming (XP) methodology: design and code the bare minimum to meet the requirements from scoping, nothing more. While you need to be aware of the future requirements, for example future average load requirements or behavior of the system at peak loading times, don't try to second-guess what the system will need to look like in the future. In addition, the J2EE platform defines characteristics such as scalability and failover as tasks the server infrastructure should handle for you.
With minimal systems, composed of small components designed to do one thing and do it well, the reuse level improves, as does system stability. Moreover, your system's maintainability strengthens and future requirements can be added much more easily. Continued

Java EE at a Glance

Java EE at a Glance: "Java EE at a Glance"

Thursday, April 19, 2007

xp_sendmail (Transact-SQL)

xp_sendmail (Transact-SQL): "xp_sendmail (Transact-SQL)"
xp_sendmail { [ @recipients= ] 'recipients [ ;...n ]' }
[ ,[ @message= ] 'message' ]
[ ,[ @query= ] 'query' ]
[ ,[ @attachments= ] 'attachments [ ;...n ]' ]
[ ,[ @copy_recipients= ] 'copy_recipients [ ;...n ]'
[ ,[ @blind_copy_recipients= ] 'blind_copy_recipients [ ;...n ]'
[ ,[ @subject= ] 'subject' ]
[ ,[ @type= ] 'type' ]
[ ,[ @attach_results= ] 'attach_value' ]
[ ,[ @no_output= ] 'output_value' ]
[ ,[ @no_header= ] 'header_value' ]
[ ,[ @width= ] width ]
[ ,[ @separator= ] 'separator' ]
[ ,[ @echo_error= ] 'echo_value' ]
[ ,[ @set_user= ] 'user' ]
[ ,[ @dbuse= ] 'database' ]

Sending email from .bat files - Automatically run .bat files - Help

Sending email from .bat files - Automatically run .bat files - Help: "Sending email from .bat files"

How do I send a message from a batch file?

How do I send a message from a batch file?: "How do I send a message from a batch file?"

net send ""

ASP.NET AJAX > The UpdatePanel Control > Using the UpdatePanel Control with Data-Bound Controls

ASP.NET AJAX > The UpdatePanel Control > Using the UpdatePanel Control with Data-Bound Controls: "Using the ASP.NET UpdatePanel Control with Data-Bound Controls"

ASP.NET AJAX > The UpdatePanel Control > Using the UpdatePanel Control with Data-Bound Controls

ASP.NET AJAX > The UpdatePanel Control > Using the UpdatePanel Control with Data-Bound Controls: "Using the ASP.NET UpdatePanel Control with Data-Bound Controls"

ASP.NET AJAX > ASP.NET AJAX Roadmap

ASP.NET AJAX > ASP.NET AJAX Roadmap: "ASP.NET AJAX Roadmap"

Source Viewer

Source Viewer: "SampleAJAXApplication Sample"

ASP.NET AJAX > Sample ASP.NET AJAX Application

ASP.NET AJAX > Sample ASP.NET AJAX Application: "Sample ASP.NET AJAX Application"


www.svdeals.com super value deals

Wednesday, April 18, 2007

How to connect and disconnect a network drive in Windows XP

How to connect and disconnect a network drive in Windows XP: "How to connect and disconnect a network drive in Windows XP"




www.svdeals.com super value deals

Net use - Connect to a File/Printer Share

Net use - Connect to a File/Printer Share: " NET Command "

NET USE
The NET Command is used to connect to a File/Printer Share as follows:
Join a file share (Drive MAP) - Win 2K / XP / 2003 NET USE [driveletter:] \\ComputerName\ShareName\folder1\folder2 /PERSISTENT:No
The commands below work in NT 4 or greater -Make all future connections persistent (auto-reconnect at login)NET USE /Persistent:Yesor NET USE /P:Yes
Make all future connections non-persistent (reconnect with login script)NET USE /Persistent:NoorNET USE /P:No
Join a file share (Drive MAP)NET USE [driveletter:] \\ComputerName\ShareName /PERSISTENT:YES
Join a file share (Drive MAP) - with a "long" share nameNET USE [driveletter:] "\\ComputerName\ShareName"
Connect a user to their HOME directoryNET USE [devicename *] [password *]] [/HOME]This requires the users Home server/folder to be defined in ADUCJoin a password protected file share (Drive MAP)NET USE [driveletter:] \\ComputerName\ShareName[\volume] [password *][/USER:[domainname\]username] [/PERSISTENT:No]In the above command /USER can also be specified as:[/USER:[dotted domain name\]username][/USER:[username@dotted domain name] In a script, to map a drive and wait until the mapping has completed before continuing:START /wait NET USE [driveletter:] \\ComputerName\ShareNameThis will be a little slower, but ensures that files can be read from the mapped drive immediately.Join a Printer ShareNET USE [LPTx:] \\ComputerName\printer_share /PERSISTENT:YESJoin a Printer Share - with a "long" share nameNET USE [LPTx:] "\\ComputerName\printer_share"Disconnect from a shareNET USE [driveletter:] /DELETE
Examples
NET USE H: /HomeNET USE H: \\MainServer\Users\%Username%NET USE W: \\MainServer\GroupShare /Persistent:NoNET USE \\MainServer\SharedPrinterNotes:NET USE command can map a network printer to an LPT port (for DOS type applications that print to a port.) but this does not add the printer to Control Panel - Printers.
By default all mapped drives have a 15 minute idle session timeout, you can modify this with the NET CONFIG command. This timeout does affect NT and 2000 but actually became visible in the XP GUI, this behaviour is to improve the overall performance.
Alternatives
Windows Scripting Host (WSH) provides alternative and arguably better commands, for XP and 2003 this is the way to go:Wsh.MapNetworkDrive [ example script ]Wsh.AddWindowsPrinterConnection [Examples]
Drive Descriptions
Recent versions of Windows display a drive description, this can be edited in the Explorer GUI. The text is stored in the registry.Win 2K stores a description for each drive letter, XP stores a description for each share.Win XP registry
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\##ComputerName#ShareName
_LabelFromReg=
(string REG_SZ)
Windows 2000 registry
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints\DriveLetter\_LabelFromReg
Cache =
(REG_BINARY data type)
"Two roads diverged in a wood, and I-I took the one less traveled by,And that has made all the difference - Robert FrostRelated:CON2PRT - Connect or disconnect a PrinterNET - Manage network resourcesNET SHARE - Create file shareOPENFILES - List or disconnect open files, local or remote (Win XP)PUSHD - map to a drive shareRMTSHARE - List or edit a file share or print share (on any computer)RUNDLL32 - Add/remove print connectionsSHARE - List or edit a file share or print shareWMIC NETUSE - WMI access to drive mappingsWsh.MapNetworkDrive - Map DriveWsh.AddWindowsPrinterConnection - Connect to Printerfsmgmt.msc - List or disconnect open files - (Win XP GUI)Drmapsrv - Drive Share for use with Terminal Services (Win 2K Server Resource Kit only)Q138365 - Autodisconnect (Red cross)Q305355 - Drives disconnected, and a red "X" appearsSlow Network Browsing (XP)Equivalent Linux BASH commands:id - Print user and group id'slogname - Print current login nametty - Print filename of terminal on stdinuname - Print system informationusers - Print login names of users currently logged inwho - Print who is currently logged in

www.svdeals.com super value deals

Monday, April 16, 2007

FAQ - stretching a background image

FAQ - stretching a background image: "stretch a background image? "




www.svdeals.com super value deals

Introduction to ASP.NET 2.0 Themes

Introduction to ASP.NET 2.0 Themes: "Introduction to ASP.NET 2.0 Themes"






www.svdeals.com super value deals

Pdfizer, a dumb HTML to PDF converter, in C# - The Code Project - C# Programming

Pdfizer, a dumb HTML to PDF converter, in C# - The Code Project - C# Programming: "basic HTML to PDF converter"



www.svdeals.com super value deals

How to Use CACLS.EXE in a Batch File

How to Use CACLS.EXE in a Batch File: "How to Use CACLS.EXE in a Batch File"

PR Newswire Business News: Oracle Delivers JD Edwards World A9.1: US:ORCL - MSN Money

PR Newswire Business News: Oracle Delivers JD Edwards World A9.1: US:ORCL - MSN Money: "Oracle Delivers JD Edwards World A9.1"

Early Adopters Benefit From Operational Excellence and New Upgrade Tools Enable a Lower Total Cost of Ownership
LAS VEGAS - COLLABORATE '07 User Group Conference, April 16 /PRNewswire- FirstCall/ -- Oracle ORCL today announced the general availability of Oracle's JD Edwards World A9.1, delivering more than 1,250 enhancements to enable operational excellence, improve customers' upgrade processes and help reduce the cost and complexity of integrations. As part of Oracle's early adopter program, companies including Fike Corporation, LaSalle Bristol and HIT Entertainment have already begun to leverage the new capabilities in order to support complex business processes with minimal costs.

Considered the "Renaissance Release," JD Edwards World A9.1 is another example of Oracle's ongoing commitment to "Applications Unlimited," Oracle's pledge to continue to enhance and develop current applications. Oracle also worked with IBM while developing this latest release to optimize the performance on the IBM System i business computing platform.
"With this latest release, we committed to delivering the quality and innovation that customers have come to expect from Oracle's JD Edwards World products," said Oracle Vice President and General Manager of JD Edwards World, John Schiff. "The response and excitement we've received from customers on the new features, functionality and upgrade capabilities in JD Edwards World A9.1 has been remarkable. The feedback also indicates that we're achieving our goal of giving companies valuable, user-friendly solutions to address the complexities and expense of operating in today's global and highly competitive markets."
Improving Global Operational Excellence
As part of the new release, Oracle has delivered Service and Warranty Management, a new module that provides functionality for managing, defining and executing service and warranty contracts, allowing customers to record service contracts, accept returns of materials for repair, execute repair orders and seamlessly bill or expense repair costs to the customer. Now, service is fully integrated with other JD Edwards World applications, which facilitates planning and provides an automated process for tracking service request status. This latest release also includes enhancements to JD Edwards World Quality Management System to help customers identify areas where failures occur, reduce the costs of unused materials and increase customer satisfaction by improving overall product quality.
Fike Corporation, a customer in Oracle's early adopter program, has used JD Edwards World since 1995 in its business of manufacturing and distributing fire protection and fire detection systems. The company recognized an opportunity to eliminate or significantly reduce the number of disparate systems and custom programs by upgrading to JD Edwards World A9.1. "We wanted to benefit from a single, comprehensive software foundation that could support our manufacturing and distribution efforts and free us from the challenges of relying on siloed information and disjointed processes," said Fike Corporation Director of Business Systems, Marty Nelson. "Through our initial deployment, we've been impressed by the enhancements within the quality management and service and warranty management modules. Giving our users better tools to do their job is only part of the story. We are confident that through this upgrade we will have a new foundation on which to build upon the theme of continuous improvement of products and services to our customers."
Improved Upgradeability through Technology Advancements
When completing a software upgrade, companies often face challenges ranging from retrofitting custom code to testing and training. With JD Edwards World A9.1, Oracle has significantly simplified the upgrade and retrofitting process with new tools. Customers can create a report that compares their current source code to the new release, helping to predict what custom code can be eliminated and what may need to be retrofitted. Another new tool compares the configuration settings of the customer's existing release with the new release. Because data cleanup is important for efficient operations as well as upgrades, this release also includes new tools to archive data and identify versions of reports that are no longer needed.
The JD Edwards World web interface now supports a Java deployment to ease installation, improve performance and create a unified look and feel. Also, a new Dynamic Build feature, embedded in the Java software, allows custom panels to be automatically converted to display in a web browser.
LaSalle Bristol, a supplier to the manufactured housing and RV industries, took advantage of Oracle's early adopter program to receive personalized support from Oracle and a smooth implementation. "My experience with the JD Edwards World product dates back to 1990 and includes numerous upgrades. A9.1 has been by far, the easiest deployment with the fewest business interruptions," said LaSalle Bristol Vice President of Information Systems Michael Caldwell. "In particular, we were impressed by how quickly our files converted and the knowledge and support we received from Oracle. I would recommend an upgrade to this latest release to any current World customer."
Enabling Reduced Cost and Complexity of Integration
To improve integration and create a truly flexible, adaptable IT infrastructure, Oracle's JD Edwards A9.1 is service-enabled, improving extensibility and performance for customers who desire to adopt a Service-Oriented Architecture (SOA) as an integration strategy. As a result, customers are equipped to leverage legacy investments more fully, lower the cost of IT maintenance and operations and respond more quickly to dynamic conditions. Also, with JD Edwards World A9.1, customers gain more control and support for importing and exporting data between JD Edwards World and the multiple spreadsheets that exist within an organization.
HIT Entertainment, one of the world's leading independent children's entertainment producers and rights-owners also participated in Oracle's early adopter program. HIT's portfolio includes internationally renowned children's properties such as Bob the Builder(TM), Thomas & Friends(TM) and Barney(TM). "We are already live and running our business on JD Edwards World A9.1," said HIT Entertainment Director of IT Greg White. "As a result of this latest release, we are able to benefit from an integrated solution that is increasing our productivity and our business efficiencies. The upgrade has been a solid decision for the health of our IT infrastructure and our business."
General Availability
JD Edwards World A9.1 is currently available for traditional deployment and on demand via Oracle On Demand. The double byte version of JD Edwards World A9.1 is planned to be available in the next calendar year.
About Oracle
Oracle is the world's largest enterprise software company. For more information about Oracle, please visit our Web site at http://www.oracle.com.
Trademarks
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Copyright 2007 PR Newswire


www.svdeals.com super value deals

Friday, April 13, 2007

ASP.NET Forums - Screen Scrape -- kinda

ASP.NET Forums - Screen Scrape -- kinda: "Screen Scrape -- kinda "


www.svdeals.com super value deals

Using ASP.NET To Prompt A User To Save When Leaving A Page

Using ASP.NET To Prompt A User To Save When Leaving A Page: "Using ASP.NET To Prompt A User To Save When Leaving A Page"


www.svdeals.com super value deals

ASP.NET.4GuysFromRolla.com: A Deeper Look at Performing HTTP Requests in an ASP.NET Page

ASP.NET.4GuysFromRolla.com: A Deeper Look at Performing HTTP Requests in an ASP.NET Page: "Deeper Look at Performing HTTP Requests in an ASP.NET "


www.svdeals.com super value deals

Capturing Output from ASP.Net Pages - Rick Strahl's Web Log

Capturing Output from ASP.Net Pages - Rick Strahl's Web Log: "Capturing Output from ASP.Net Pages"


www.svdeals.com - super value deals

Call External EXE program from EnterpriseOne application

Summary:
E1: FDA: Call External EXE program from EnterpriseOne application
Details: SOLUTION ID: 200987572 E1: FDA: Call External EXE program from EnterpriseOne application

ISSUE:
How can I call an external .exe program from within an EnterpriseOne application?

SOLUTION:
The following methods can be used to call an external .exe program from an EnterpriseOne application

Method 1 : Using B34A1030 - Execute External Program
Business function B34A1030 - Execute External Program can be used to call an external program from within an EnterpriseOne application. The command must be passed to the function in an appropriate command format to run on the platform where the business function is called.

The example below calls the notepad.exe program, Pass in the szCommandLine as c:\winnt\Notepad.exe
Example:

Execute External Program
UNDEFINED -> cSuppressErrorMessage
VA ErrorCode <- cErrorCode
VA ErrorMessage <- szErrorMessageId
"c:\winnt\Notepad.exe" -> szCommandLine

Refer to the related Solution 200953337 which shows how to use B34A1030 on AS400 server.

Method 2: Using System Function "Run Executable" (Note: This system function is available in Interactive Applications Only)

Example:
In event rules, choose the system function icon and select the Run Executable system function under General.

Run Executable("C:\Path", "crc95.exe", "-g", "C:\Path\lynn.txt", , "C:\Path")

SPECIFIC TO: EnterpriseOne

KEYWORDS:
FDA-EVENT RULES-BUSINESS FUNCTIONS
BSFN
External program
Calling


www.svdeals.com - super value deals

Wednesday, April 11, 2007

Tuesday, April 10, 2007

ScottGu's Blog : Sending Email with System.Net.Mail

ScottGu's Blog : Sending Email with System.Net.Mail: "Sending Email with System.Net.Mail"
Sending Email with System.Net.Mail
.NET 2.0 includes much richer Email API support within the System.Net.Mail code namespace. I've seen a few questions from folks wondering about how to get started with it. Here is a simple snippet of how to send an email message from “sender@foo.bar.com” to multiple email recipients (note that the To a CC properties are collections and so can handle multiple address targets):

MailMessage message = new MailMessage();
message.From = new MailAddress("sender@foo.bar.com");

message.To.Add(new MailAddress("recipient1@foo.bar.com"));
message.To.Add(new MailAddress("recipient2@foo.bar.com"));
message.To.Add(new MailAddress("recipient3@foo.bar.com"));

message.CC.Add(new MailAddress("carboncopy@foo.bar.com"));
message.Subject = "This is my subject";
message.Body = "This is the content";

SmtpClient client = new SmtpClient();
client.Send(message);

System.Net.Mail reads SMTP configuration data out of the standard .NET configuration system (so for ASP.NET applications you’d configure this in your application’s web.config file). Here is an example of how to configure it:









www.svdeals.com

E Mail Template in ASP.NET 2.0

E Mail Template in ASP.NET 2.0: "E Mail Template in ASP.NET 2.0"

Monday, April 9, 2007

The New ASP 3.0 Server Methods

15 Seconds : The New ASP 3.0 Server Methods: "The New ASP 3.0 Server Methods"

Error Logging in ASP 3.0

ASP 101 - Articles: "Implementing Error Logging in ASP 3.0"

ASP 3.0 Server.Execute Method

Server.Execute Method: "Server.Execute Method "

ASP 3.0 Server.Transfer Method

Server.Transfer Method: "Server.Transfer Method "

4GuysFromRolla.com - A Look at ASP 3.0

4GuysFromRolla.com - A Look at ASP 3.0: "A Look at ASP 3.0 "

www.svdeals.com

15 Seconds : Implementing AJAX Using ASP.NET 1.1

15 Seconds : Implementing AJAX Using ASP.NET 1.1: "Implementing AJAX Using ASP.NET 1.1"
Introduction
You've heard of it. It is the latest buzz term for web programmers these days. AJAX is an acronym that stands for Asynchronous JavaScript and XML. AJAX gains its popularity by allowing data on a page to be dynamically updated without having to make the browser reload the page. I will describe more about how AJAX works, and then go into some sample code to try out.
This term has been made famous by some of Google's latest web apps. At the top of this list is Google Suggest, which gives you suggestions (go figure) on what you are searching for as you type based on popularity of the search term. If you aren't familiar with Google Suggest, check it out.
There is more going on here than just AJAX however. The actual drop down list is an additional DHTML piece that we will not be covering in this article.
Is AJAX a new technology? Yes and no would both be incorrect answers. A proper answer would be a new application of current technologies, with emphasis on plurality. This list of technologies includes standard HTML controls, JavaScript, an XML HTTP component, and XML data structures.
The Steps
The following is an outline of the sequence of events when using AJAX:
Web page is rendered
A trigger executes a JavaScript function call (i.e. onKeyUp, button click, setTimeout, page load, etc.)
JavaScript instantiates an XML HTTP object
XML HTTP object calls a remote page
Remote Page transforms an XML structure using XSLT and returns the result
JavaScript accepts the results and applies it to the page
Tada! No page reload, just magical dynamic data
Get To It Already!
These steps are great, but without a sample application it is tough to envision. Being the responsible author that I am, I have of course included a sample of the steps discussed.
I think that it is important to discuss the XML HTTP object to gain a better understanding of what is going on here. XML HTTP allows code to connect to a remote location and perform GET and POST requests asynchronously. This means that we can connect to a remote host, send a request, and continue on with additional logic. When the remote host returns a response, a function designated to handle the return event is able to accept the data and make decisions based on what was received. The data passed to and from the remote host does not have to be in an XML format. XML is simply a well-formatted string. I have found on multiple occassions that passing a string that is not in an XML format is most appropriate for the given task. The XML HTTP object will not be compatible on all browsers or operating systems. Being that this is a client side function the client machine is responsible for the implementation as opposed to the server.
I have been utilizing this object since ASP 3.0 for making remote calls from a web page. Imagine the power here. Data and processes are accessed on disparate locations without the client ever having to leave the comfort of the domain or page that he/she is on.
The JavaScript
The JavaScript is the real meat and potatoes in AJAX. It handles the change detection, data request and receipt, and placing the data on the page.
Be sure to update the requestURL variable with the path that you will be accessing the aspx file from.
The following is the JavaScript code used:

The Client Page (HTML)
The client page, excluding the JavaScript, is about as basic as it gets. A simple form with an onKeyUp event in a text box is all that is really required. I included a DIV tag to display the resulting data. The HTML has been provided:

The Remote Page
When a request is made from the JavaScript, it makes contact with the "remote page." A query string variable, "q", is included representing the data that was keyed by the user. I am going to construct an XML string, only including those elements that are valid based on the search term. To relieve the client side script from doing any formatting, I have applied an XSL transformation on the XML data. Formatting the XML on the server side is a much better solution than formatting within the JavaScript on the client side. A major point to recognize is that certain browsers will not support XML and XSL objects. Assuming you want your data to always be formatted the same, stick with the server side logic.
Create a page called GetUsernames.aspx. Be sure to remove ALL HTML from the page except the required @Page line. The code-behind will create the output to display on the page. Add the following code to the code-behind file:
using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Xml; using System.Xml.Xsl; using System.Xml.XPath; namespace MiscTest { /// /// Summary description for GetUsernames. /// public class GetUsernames : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { GetUsernameList(); } #region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); } /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.Load += new System.EventHandler(this.Page_Load); } #endregion private void GetUsernameList() { //Get the request query string strQuery = Request["q"].ToString(); //Create the XML-like string to be sent back to the request string strXmlNames = ""; //An arbitrary array of names that will be written to an XML Document. string[] arrStrNames = new string[5]{"Ian Suttle", "John Doe", "Alex Wright", "Albert Einstein", "Sierra Tracy"}; //Loop through the names, creating a psuedo XML element for each foreach(string strName in arrStrNames) { //If the request matches the beginning of a name, then add it to the string // otherwise it shouldn't be a valid match if (strName.ToLower().Substring(0, strQuery.Length) == strQuery.ToLower()) strXmlNames += "" + strName + ""; } //Prepend and append the parent element strXmlNames = "" + strXmlNames + ""; //Create an XmlDocument object to store the XML string that we created XmlDocument xDoc = new XmlDocument(); xDoc.LoadXml(strXmlNames); //Create a navigator object to use in the XSL transformation XPathNavigator xPathNav = xDoc.CreateNavigator(); //Create the XSLTransform object XslTransform xslt = new XslTransform(); xslt.Load(Server.MapPath("Names.xslt")); //Do the transformation and send the results out to the Response object's output stream xslt.Transform(xPathNav, null, Response.OutputStream); } } }
The XSL Stylesheet
The XSL document is used to format the XML data to a defined presentation. The code to do the transformation is included here, although great detail on how this works is not the topic of this article. Create a new XSL document called Names.xslt and paste the following code into it:


Conclusion
So once again, AJAX is nothing more than an application of technologies that have been around for a number of years. ASP.NET isn't the wizard behind this curtain. There is nothing here that can't be done in ASP Classic and JavaScript. Not that given a choice one would revert to ASP Classic :). Additionally, ASP.NET 2.0 will have a completely different approach to making remote calls from a page.
The possible implications of AJAX are very impressive. Updating notices, checking email, monitoring processes, etc... The limits of application are virtually up to the imagination of the developer.
About the Author
Ian Suttle is a Microsoft Certified Professional in Visual Basic 6.0. He has 6 years of development experience with web, desktop, and database applications with Microsoft and Java technologies. Ian is currently a senior software engineer at IGN / GameSpy. He has a great deal of experience architecting and implementing e-commerce solutions, fraud detection and management, and multi-user interactive environments.

ASP.NET Web: The Official Microsoft ASP.NET 2.0 Site : AJAX Videos

AJAX Videos

ASP.NET Web: The Official Microsoft ASP.NET 2.0 Site : Videos


www.svdeals.com

Friday, April 6, 2007

MSDN "WPF/E" (codename) Dev Center

MSDN "WPF/E" (codename) Dev Center: "MSDN 'WPF/E' (codename) Dev Center "

“WPF/E” is the Microsoft solution for delivering rich, cross-platform, interactive experiences including animation, graphics, audio, and video for the Web and beyond. Utilizing a subset of XAML (eXtensible Application Markup Language)-based Windows Presentation Foundation technology, “WPF/E” will enable the creation of content and applications that run within multiple browsers and operating systems (Windows and Macintosh) using Web standards for programmability. Consistent with Web architecture, the XAML markup is programmable using JavaScript and works well with ASP.NET AJAX. Broadly available for customers in the first half of 2007, “WPF/E” experiences will require a lightweight browser plug-in made freely available by Microsoft.

Feb 2007 “WPF/E" (codename) Community Preview Available! The Feb 2007 release of “WPF/E” is available. The update includes refresh of “WPF/E” for Windows and Mac, new SDK and new samples. More than 10 new features are enabled in this release including better text input and presentation capabilities, mouse cursor support, better media rendering, improved programmability and more…

Use Expression Tools to Design Your User Experience Microsoft Expression takes the many sides of your creative personality to all new levels. Professional design tools give you greater flexibility to create sophisticated applications and content. The Expression suite allows you to design the XAML elements needed for your experience and also manage your graphic and video assets.
"WPF/E" on Channel 9
Deliver rich Web video experiences with “WPF/E” and Windows Media
“WPF/E” SDK documentation
Microsoft Expression
Design at Microsoft
"WPF/E" (codename) CTP (February 2007) SDK Samples

Page Turn Media
The revamped Page Turn sample shows how "WPF/E" uses XAML to create a compelling presentation of images. It also shows an additional navigation element that allows users to quickly jump to a specific image. The sample also includes support to new resource loading capabilities.

Media Library
This revamped example uses a real world scenario of a video site. The sample is rendering a progressive download video feed from Channel 9 and uses ASP.NET AJAX to improve the interaction parameters of this sample (watch how back button works). Notice how resize works as the underlying presentation player (XAML) is vector-based. The sample includes support for full screen video.

Sprawl Game
"WPF/E" is perfect for creating casual games. This revamped sample shows a typical casual game that can be integrated in the browser windows or played full screen with mouse input. This samples is enhanced with asynchronousresource loading and personalization. All the elements of this game were created using the Microsoft Expression suite.

Simple Video Playback
The simple video playback samples provide the essentials you need for showing video playback on your site. The minimalist control uses an efficient design that hides the control when it is not needed using subtle animations. The samples supports full screen playback.

Film Strip Slideshow
Learn what “WPF/E” has to offer, while viewing a “WPF/E” sample. This example uses animation to implement a slide show style presentation and supports asynchronous loading of images.

“WPF/E” Pad
Exercise your XAML and also experience a great sample. This sample is a WYSIWYG XAML editor that shows great integration between HTML input ad XAML output on a page.

“WPF/E” Piano
Practice your piano playing capabilities with this “WPF/E” powered piano. Hear WMV and MP3 sounds as you stroke the keys.

TileText
Enter text and watch how wood etched tiles fall into place with this small sample.

Thursday, April 5, 2007

E-Mail Functionality in SQL Server 2005

E-Mail Functionality in SQL Server 2005: "E-Mail Functionality in SQL Server 2005"

SQL Server : What happens when SQL Server executes a stored procedure or query ?

SQL Server : What happens when SQL Server executes a stored procedure or query ?: "What happens when SQL Server executes a stored procedure or query ?"

SQL Server : What happens when SQL Server executes a stored procedure or query ?

SQL Server : What happens when SQL Server executes a stored procedure or query ?: "What happens when SQL Server executes a stored procedure or query ?"

jGuru: How do I automatically generate primary keys?

jGuru: How do I automatically generate primary keys?: "Question How do I automatically generate primary keys? "

Answer A common way to do it is to use a stateless session bean to retrieve the ID that you wish to use as the primary key. This stateless session bean can then execute an Oracle sequencer or procedure etc. to retrieve the ID value used as the primary key.

SQLZOO, CREATE a table with an autonumber / sequence / identity / autoincrement

SQLZOO, CREATE a table with an autonumber / sequence / identity / autoincrement

CREATE TABLE t_test( id INTEGER AUTO_INCREMENT PRIMARY KEY, name VARCHAR(10) );INSERT INTO t_test(name) VALUES ('Andrew');INSERT INTO t_test(name) VALUES ('Gordon');SELECT * FROM t_test;

Tuesday, April 3, 2007

CodeTranslator: Free Code Translation From VB.NET <-> C#

CodeTranslator: Free Code Translation From VB.NET <-> C#

This service will translate the code for you, just start typing the code or upload a file to translate it. For now it only supports from VB.NET to C# and from C# to VB.NET. To use it you can either:
Start typing your code.
Copy and Paste the code in the Code Text Box.
Translate an entire file using the file upload.

ASP.NET Forums - Listing the contents of a folder

ASP.NET Forums - Listing the contents of a folder: "Listing the contents of a folder "
Dim dir As System.IO.DirectoryInfo Dim files() As System.IO.FileInfo 'array of fileinfo objects
'get the specified directory dir = New System.IO.DirectoryInfo("d:\hosting\dan")
'find all files in that directory files = dir.GetFiles()

Monday, April 2, 2007

Build Google IG like Ajax Start Page in 7 days using ASP.NET Ajax and .NET 3.0 - The Code Project - AJAX / Atlas

Build Google IG like Ajax Start Page in 7 days using ASP.NET Ajax and .NET 3.0 - The Code Project - AJAX / Atlas: "Build Google IG like Ajax Start Page in 7 days using ASP.NET Ajax and .NET 3.0"

AJAX : The Official Microsoft ASP.NET AJAX Site

AJAX : The Official Microsoft ASP.NET AJAX Site: "

ASP.NET AJAX is a free framework for quickly creating a new generation of more efficient, more interactive and highly-personalized Web experiences that work across all the most popular browsers.
With ASP.NET AJAX, you can:
Create next-generation interfaces with reusable AJAX components.
Enhance existing Web pages using powerful AJAX controls with support for all modern browsers.
Continue using Visual Studio 2005 to take your ASP.NET 2.0 sites to the next level.
Access remote services and data directly from the browser without writing a ton of complicated script.
Enjoy the benefits of a free framework with technical support provided by Microsoft. "

AJAX Introduction

AJAX Introduction: "AJAX = Asynchronous JavaScript and XML"

AJAX = Asynchronous JavaScript and XML
AJAX is not a new programming language, but a technique for creating better, faster, and more interactive web applications.
With AJAX, your JavaScript can communicate directly with the server, using the JavaScript XMLHttpRequest object. With this object, your JavaScript can trade data with a web server, without reloading the page.
AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages.
The AJAX technique makes Internet applications smaller, faster and more user-friendly.

Ajax (programming) - Wikipedia, the free encyclopedia

Ajax (programming) - Wikipedia, the free encyclopedia: "Ajax (programming)"