Learn dot net

October 11, 2006

Code Style Enforcer

Filed under: Learn,Links,Tutorial — Aris Priyantoro @ 8:19 am

Code style enforcer is a tools to enforce your C# code into Idesign standard rule.

http://joel.fjorden.se/static.php?page=CodeStyleEnforcer

nice plugins… 🙂

October 6, 2006

Add some website on Windows XP Pro

Filed under: Learn,Links,Tutorial — Aris Priyantoro @ 11:37 am

Basically, Windows XP Profesional can’t add multiple domain into IIS. There is only one root. Here the tools to modify the root into one or more.

http://www.codeproject.com/csharp/IIsAdminNet.asp

September 18, 2006

Webservices

Filed under: Learn,Tutorial — Aris Priyantoro @ 10:53 pm

how to create webservices on Visual Studio 2003/2005. here some links about that:

If you have any message like that ” The test form is only available for requests from the local machine.” on testing your webservice, try add this syntax into your web.config.

<webServices>
<protocols>
<add name=”HttpGet”/>
<add name=”HttpPost”/>
</protocols>
</webServices>

http://support.microsoft.com/default.aspx?scid=kb;en-us;819267

September 15, 2006

Enabling Sharepoint Webpart on your Visual Studio 2005

Filed under: Learn,Tutorial — Aris Priyantoro @ 9:51 pm

I couldn’t create a sharepoint webpart project using Visual Studio 2005. By googling i found some resources about that, here the resources:

You need to install SharePoint_2003_VS2005_WebPart_Template.vsi V2 corrected version (537,63 KB) first.
But, that installer need another package, that is MSBee .

Then, close your Visual Studio 2005 IDE and reopen it. Now, you can create sharepoint webpart project.

To enabling Sharepoint webpart on Visual Studio 2003, please follow this link http://www.devx.com/dotnet/Article/17518/0/page/1

Develop WebPart

Filed under: Learn,Tutorial — Aris Priyantoro @ 9:42 am

Finally, i can develop webpart after getting some confuse at the beginning. Here some links about it.

September 14, 2006

Microsoft Windows Sharepoint

Filed under: Learn,Tutorial — Aris Priyantoro @ 7:38 pm

I don’t know what Windows Sharepoint is? So, i googling and found some articles about that.

September 6, 2006

String Formatting

Filed under: Tutorial — Aris Priyantoro @ 10:09 am

I have some difficulty to format string. After googling for a while, then i found this site:

http://blog.stevex.net/index.php/string-formatting-in-csharp/

Very nice tutorial. Thx

September 2, 2006

Reqular Expression

Filed under: Tutorial — Aris Priyantoro @ 6:11 am

do you want to implement regular expression on your application? Follow this links:

September 1, 2006

Error Loading Form

Filed under: Tutorial — Aris Priyantoro @ 11:55 am

Do you ever meet this error:


Server Error in '/pos/Transaction' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type 'pos.Transaction.WebForm1'. Source Error:

Line 1:  <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="pos.Transaction.WebForm1" %>
Line 2:  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Line 3:  <HTML>

Source File: c:\inetpub\wwwroot\pos\Transaction\WebForm1.aspx Line: 1


Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032


In my case, i could solve this problem by Remove as Application for folder Transaction using IIS Control Panel.

August 29, 2006

Client-Side textbox Calculation

Filed under: Tutorial — Aris Priyantoro @ 1:53 pm

javascript Code

script language=”javascript”>

function focusText(control) {
control.style.backgroundColor = “#ffffcc”;
}

function checkText(control) {
if(control.value == “” || isNaN(control.value)) {
control.focus();
focusText(control);
}

else {
control.style.backgroundColor = “#ffffff”;
Calculate();
}
}

function Calculate() {
var price = isNaN(document.frmAddDetail.txtPrice.value) ? 0 : document.frmAddDetail.txtPrice.value;
var qty = isNaN(document.frmAddDetail.txtQuantity.value) ? 0 : document.frmAddDetail.txtQuantity.value;
var disc = isNaN(document.frmAddDetail.txtDiscount.value) ? 0 : document.frmAddDetail.txtDiscount.value;

var discount = price * qty * disc / 100;

document.frmAddDetail.txtTotal.value = price * qty – discount;
}

script>

Aspx Code:

form id=”frmAddDetail” method=”post” runat=”server”>
 
h1>Add Detail Transactionh1>
P>
TABLE id=”tblAdd” style=”WIDTH: 552px; HEIGHT: 163px” cellSpacing=”1″ cellPadding=”1″
width=”552″ border=”0″>
TR>
TD style=”HEIGHT: 6px” noWrap>Item
TD>
TD style=”HEIGHT: 6px”>:TD>
TD style=”HEIGHT: 6px” noWrap>asp:dropdownlist id=”cmbItem” runat=”server” Width=”174px”>asp:dropdownlist>asp:requiredfieldvalidator id=”userValidate” runat=”server” ControlToValidate=”cmbItem” ErrorMessage=”Item Code required”>asp:requiredfieldvalidator>TD>
TR>
TR>
TD noWrap>PriceTD>
TD>:TD>
TD noWrap>asp:textbox id=”txtPrice” runat=”server” onFocus=”focusText(this)” onBlur=”checkText(this)”>asp:textbox>asp:requiredfieldvalidator id=”RequiredFieldValidator1″ runat=”server” ControlToValidate=”txtPrice” ErrorMessage=”Price must be filled”>asp:requiredfieldvalidator>TD>
TR>
TR>
TD noWrap>QuantityTD>
TD>:TD>
TD noWrap>asp:textbox id=”txtQuantity” runat=”server” onFocus=”focusText(this)” onBlur=”checkText(this)”>asp:textbox>asp:requiredfieldvalidator id=”Requiredfieldvalidator2″ runat=”server” ControlToValidate=”txtQuantity” ErrorMessage=”Quantity must be filled”>asp:requiredfieldvalidator>TD>
TR>
TR>
TD noWrap>DiscountTD>
TD>:TD>
TD noWrap>asp:textbox id=”txtDiscount” runat=”server” onFocus=”focusText(this)” onBlur=”checkText(this)”>0asp:textbox>asp:requiredfieldvalidator id=”Requiredfieldvalidator3″ runat=”server” ControlToValidate=”txtDiscount” ErrorMessage=”Discount minimum 0%”>asp:requiredfieldvalidator>TD>
TR>
TR>
TD noWrap>TotalTD>
TD>:TD>
TD noWrap>asp:textbox id=”txtTotal” runat=”server” onFocus=”checkText(this)” ReadOnly>asp:textbox>asp:requiredfieldvalidator id=”Requiredfieldvalidator4″ runat=”server” ControlToValidate=”txtQuantity” ErrorMessage=”Quantity must be filled”>asp:requiredfieldvalidator>TD>
TR>
TR>
TD noWrap colSpan=”3″>asp:button id=”btnSave” runat=”server” Text=”Save”>asp:button> 
asp:button id=”btnCancel” runat=”server” Text=”Cancel”>asp:button>TD>
TR>
TABLE>
asp:label id=”lblError” runat=”server” ForeColor=”Red” Visible=”False”>Labelasp:label>P>
form>

Create a free website or blog at WordPress.com.