Dim objMail As New MailMessage
' 用UTF8 編碼
objMail.BodyEncoding = Encoding.UTF8
......
' 轉為繁體
objMail.Subject = StrConv(v_subject, VbStrConv.TraditionalChinese, 1033)
objMail.Body = StrConv(v_body, VbStrConv.TraditionalChinese, 1033)
Dim objMail As New MailMessage
' 用UTF8 編碼
objMail.BodyEncoding = Encoding.UTF8
......
' 轉為繁體
objMail.Subject = StrConv(v_subject, VbStrConv.TraditionalChinese, 1033)
objMail.Body = StrConv(v_body, VbStrConv.TraditionalChinese, 1033)
安裝 del.icio.us 時出現了: Error code 2738
執行 regsvr32 vbscript.dll 後就可以了. (一針見血)
參考資料: http://discussions.europe.nokia.com/discussions/board/message?board.id=swupdate&thread.id=27261
我的XP每次安裝軟體, 總是遇到這個問題:
Could not access network location %USERPROFILE%\...
困擾好久, 只能暫時登錄 Administrator 安裝完再重新登錄.
原來我之前regedit並未完全作完修正動作:
1.
HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurentVersion \ Explorer \ User Shell Folders
2. 確定在右視窗有 REG_EXPAND_SZ type. 不是 REG_SZ type 的值.
3. 我的情形是: 名稱: Startup 類型: REG_SZ 資料:
%USERPROFILE%\「開始」功能表\程式集\啟動, 刪除後右鍵->新增一個同名稱和資料的:可擴充字串值(REG_EXPAND_SZ).
4. 匯出User Shell Folders 並執行之.
參考資料來源:
第一次使用Visual Studio 2005 或 2008 都會有偏好語言選擇項,
事後要修改可以在:
工具 -> 匯入和匯出設定 中重設.
private void DataGrid1_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) {
if ( (e.Item.ItemIndex%5) == 4 ) {
foreach( TableCell tc in e.Item.Cells )
tc.BackColor = Color.Red;
}
}
Private Sub dg1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dg1.ItemDataBound
If ((e.Item.ItemIndex + 1) Mod 10 = 0) Then
e.Item.BackColor = Color.Red
End If
End Sub
For i = 0 To grdResults.Items.Count - 1
Dim state As String = CType(grdResults.Items(i).Cells(0).FindControl("field_order"), Label).Text.Trim
If state = "1" Then
grdResults.Items(i).BackColor = Color.LightGray
End If
Next i
For i = 0 To grdResults.Items.Count - 1
v_cbo = CType(grdResults.Items(i).Cells(6).FindControl("field_curr"), DropDownList)
v_cbo.Enabled = False
Dim v_prc As TextBox = CType(grdResults.Items(i).Cells(7).FindControl("field_prc"), TextBox)
v_prc.Enabled = False
Next
<select id="Select1" onchange="On_Change" runat="server" onserverchange="Server_Change">
</select>
Select1.Items.Clear()
Select1.Items.Add(New ListItem("11111", "11111"))
Select1.Items.Add(New ListItem("22222", "22222"))
Select1.Items.Add(New ListItem("33333", "33333"))
Select1.Items.Add(New ListItem("44444", "44444"))
Select1.Items.Add(New ListItem("55555", "55555"))
Select1.Items.Add(New ListItem("66666", "66666"))
Dim ii As ListItem
Dim j As Integer = 1
For Each ii In Select1.Items
If (j Mod 3 = 0) Then
ii.Attributes("style") = "COLOR: Red;" + " BACKGROUND-COLOR: White; "
End If
j = j + 1
Next
...
<asp:datagrid id="grdResults" runat="server" OnItemDataBound="Item_Bound"
...
<asp:TemplateColumn SortExpression="rma_ioutno" HeaderText="Sales Slip">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:HyperLink id="xxx" STYLE='cursor:hand' runat="server" ImageUrl="../images/html.gif"></asp:HyperLink>
<asp:textbox runat="server" Width="90px" Text='<%# Container.DataItem("field_no") %>' ID="field_no" />
</ItemTemplate>
</asp:TemplateColumn>
...
Sub Item_Bound(ByVal sender As Object, ByVal e As DataGridItemEventArgs)
Dim Hk As System.Web.UI.WebControls.HyperLink
Hk = CType(e.Item.FindControl("xxx"), HyperLink)
Dim TXTsn As System.Web.UI.WebControls.TextBox
TXTsn = CType(e.Item.FindControl("field_sno"), TextBox)
Dim TXTio As System.Web.UI.WebControls.TextBox
TXTio = CType(e.Item.FindControl("field_no"), TextBox)
Dim vsn As String = "zzz"
Dim vio As String = "zzz"
If Not (IsNothing(TXTsn)) Then
vsn = TXTsn.ClientID
End If
If Not (IsNothing(TXTio)) Then
vio = TXTio.ClientID
End If
If Not (IsNothing(Hk)) Then
Hk.Attributes.Add("onclick", "atrun(" & e.Item.ItemIndex + 1 & ",'" & vsn & "'," & vio & ")")
End If
End Sub
function atrun(v_itxt, x2, x3) {
var v_cus = document.frmServer.txtcus.value;
var v_pno = escape(grdResults.rows(v_itxt).cells(3).innerText);
var v_sno = document.frmServer.elements(x2).value;
seekiout(v_cus, v_pno, v_sno, x3.id);
}
function seekiout(v_cus, v_pno, v_sn, v_itxt) {
if (v_cus && v_pno) {
popwin = window.open('ioseek.aspx?v_cus='+v_cus+'&v_pno='+v_pno+'&v_sn='+v_sn+'&v_itxt='+v_itxt,'popwin','scrollbars=yes,width=500,height=600');
popwin.focus();
} else {
alert("Customer or Product empty!!");
}
}
BoundColumn : DataFormatString="{0:n2}"
Label : <%# DataBinder.Eval(Container.DataItem, "field_prc", "{0:n2}") %>
textbox : Text='<%# DataBinder.Eval(Container.DataItem, "field_prc", "{0:n2}") %>'
textbox : style="text-align:right"
function distot(v_chk) {
if (v_chk.checked) {
Table3.style.display="none";
}else{
Table3.style.display="block";
}
}
function distot1() {
var v_chk1 = document.frmServer.rb1
var v_chk2 = document.frmServer.rb2
if (v_chk1.checked) {
document.getElementById("Label21").style.display = ''; document.getElementById("cbo_line").style.display = '';
}else{
document.getElementById("Label21").style.display = 'none'; document.getElementById("cbo_line").style.display = 'none'; }
}