Pages

Search This Blog

Sunday, September 7, 2008

Streamyx with D-Link 2640T Wireless ADSL Router

Just test on streamyx connection with D-Link 2640T Wireless ADSL Router.





For streamyx setting:
  1. Open your internet browser and go to http://192.168.1.1/, default user name/password: admin/admin
  2. Click on wizard to run the setting. Click next to begin.
  3. 1st setting will be "Choose Time Zone", select the one relavent to your time zone. For me, i select [(GMT+08:00) Hong Kong,Perth,Singapore,Taipei] since there is no Kuala Lumpur. Click on Next.
  4. 2nd setting will be "Select Internet Connection Type (WAN)". For streamyx i select PPPoE/PPPoA and click next.
  5. 3rd setting is "Set PPPoE / PPPoA". For steamyx user, keyin your user name and password.
    User Name: xxx@streamyx
    Password: xxxxxxxx
    VPI: 0 ---- 8 wont work for me, the status is waiting for response if i choose VPI: 8
    VCI: 35
    Connection Type: PPPOE LLC
  6. 4th setting is "Set Wireless LAN Connection". This is up to user to set on it. Read the menu correctly.
  7. Save and restart your router. The status should be "connected" if you check the status tab.





Happy surfing!

Sunday, August 17, 2008

Thank You

Thanks For your support!

TextArea Newline

Even wonder how to construct a new in TextArea? Many try to use <BR>
and /n but both doestn't work for me. But this &#10; work for me. Forget to mention, i'm using IE7 when do the testing. I'm not sure whether this is browser dependent.

Tuesday, August 12, 2008

ASP.NET: colon in querystring cause error "is not a valid virtual path."

Server Error in '/' Application.
'~/Search.aspx?pageidx=1&Id=:' is not a valid virtual path.


Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: '~/Search.aspx?pageidx=1&Id=:' is not a valid virtual path.


Understand that in asp.net, virtual path in the URL with colon (:) is not allowed. To solve this problem, i replace the colon (:) with ASCII value for colon &#58; (please check http://www.asciitable.com/) and HttpUtility.UrlEncode on the search key before pass into search.aspx as querystring.

In Search.aspx.cs, do HttpUtility.UrlDecode and pass to DB for searching purposes. Problem solve. Bear in mind that you might need to disable the ValidateRequest (ValidateRequest="false") which may open for dangerous hijack/request.

Monday, August 11, 2008

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

Server Error in '/xxxxx' Application.

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.            

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the
error and where it originated in the code.

Exception Details: System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

Source Error:

Line 89: <%# if (Eval("UserId").ToString().Length != 0) {%>


googling around and not able to find a solution. What i do is i put the if/else condition into a function and pass in UserId as parameter and output the desire output string.

now my line 89: become <%# FormatRatedDisplay(Eval("UserId").ToString())%> and new function FormatRatedDisplay will return a string. I issue solved.

Thursday, August 7, 2008

Microsoft .Net Framework TPM - Virus

My antivirus detect a new virus and some file has been deleted but there is a pop up windows keep on showing up and say that "procedure not found". After check around, i found something strange in windows services

Service name: bjvhrz
Display name: bjvhrz
Description: Microsoft .NET Framework TPM
Path to executable: C:\WINDOWS\system32\svchost.exe -k bjvhrz



I'm not able to stop and to disabled it.



To solve it,
  1. Disable System Restore
  2. Back up registry
  3. Restart in Safe Mode
  4. Open Registry Editor. Click Start>Run, type REGEDIT, then press Enter.
  5. In the left panel, double-click the following:
    HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Services
  6. Still in the left panel, locate and delete the key:
    bjvhrz
  7. Close Registry Editor.

Thursday, July 24, 2008

'HTTP 405 - Resource Not Allowed' in asp

This summary is not available. Please click here to view the post.

Wednesday, July 9, 2008

Javascript: Shorten for if/else

Sometime our code will looks messy if containing too many if/else. We can shorten the code and make it more tidy. Check the code below:

<html>
<head>
<script language="JavaScript">
function foo()
{
var myGender = "female";
alert((myGender == "male") ? "i am male" : "I am female");
}
</script>
</head>
<body onload="javascript:foo();">
</body>
</html>

Monday, July 7, 2008

Retrieve data from DataTable

I have a DataTable that containing set of data. To get only column name "score" from the DataTable called MyDataTable. Below is how i do

for (int i = 0; i < MyDataTable.Rows.Count; i++)

{

string score = MyDataTable.Rows[i]["score"].ToString();

xxxxxx

xxxxxx

}

Thursday, July 3, 2008

W3SVC Restart when changing ASP.NET version in ASP.NET tab (IIS)

I'm not sure what is happening but i suspect that i change the ASP.NET version in IIS cause W3SVC restart. All application in the same application pool working ok and restart successfully but other application pull have some issue.

If anyone face the same or similar issue, maybe can share your solution.