The problem with Microsoft VSS and Copy web in Visual Studio .net

Asp.NETWhen I am using the Copy Web command in the Microsoft Visual Studio .net 2005 to copy asp.net files from the local to the remote server, sometime I got error saying “Access denied” (BTW, to see the Error Log, you will have to scroll down and click the Log… button which might be invisible if you have a small screen).

To resolve this problem, you will have to logon to the remote server to make sure

  • The destination folder is opened with Write permission for the ASP.NET users
  • If you are replacing the files, please make sure the files are not READ ONLY on the remote server

The item #2 happened to me a lot, and I had to uncheck the READ ONLY checkbox from the files’ properties. The only explanation I can come up is that the Microsoft Visual Safe 6.0 sometime made the files READ-ONLY since we are using VSS for the coding collaboration.

Related posts

How to set the DefaultButton in a Page Based on ASP.NET Master Page

Challenges:

Asp.NETAs I mentioned in my previous post, I fixed the issue of hitting enter key on an ASP.NET page with a single textbox and submit button. But now new issue occurred: I could not use the Enter key on other button web controls. Whenever I hit the Enter key in the web form, the onClick event of the search button fires not the other submit buttons. I know I am Master page and the search button has been included in every page based on this master page, and the search button is in the first button web control position.

Trouble Shootings:

OK, the first thing came to my mind to resolve the issue above was to use the  new DefaultButton properties in ASP.NET 2.0 form or panel controls. But since I am using Masterpage, when I put defaultButton=”btnSubmit” in master page or put the following code in my Page_load event

Page.Form.DefaultButton = “btnSubmit”

I got the following error:

Server Error in ‘/MyApplication’ Application.
The DefaultButton of ‘form1′ must be the ID of a control of type IButtonControl.

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: The DefaultButton of ‘form1′ must be the ID of a control of type IButtonControl.

Continue reading ‘How to set the DefaultButton in a Page Based on ASP.NET Master Page’

Related posts

How to fire onClick event with hitting Enter in ASP.NET forms

Challenge:

Asp.NETI have a search box in every asp.net web page with one text box and one submit button. When the visitor clicks the submit button, he will be re-directed to a search result web page since the onClick event is fired on that submit button. But when the visitor finishes his typing and simply hits the enter key, a postback event will be fired on the page level but the onClick event of that submit button could be not fired.

Solutions

After reviewing the HTML codes and HTTP requests, I found out the pair of button name/value has not been sent to the form along with the text box. That was the reason why the page could not decide whether the submit button triggered then not fired the onClick event.

I am using ASP.NET 2.0 and experiencing such issue, and not sure whether ASP.NET 3.5 still have the same issue. But a simple work-around can fix this issue - which is to add one more textbox web control.

For example, if you only have one textbox and submit button, the query string post back to the server will be

default.aspx?txtBOX1=some+value&

But if you have more than one text boxes in your asp.net page, then your string will be

default.aspx?txtBOX1=some+value&txtBOX2=some+value…btnSubmit=Search…

Of course, you do not want the visitors to see your addtional textbox, you should use a style to hide it. Do not use visibility property since that will disable that textbox web control. So your new textbox will look like the below

<asp:TextBox ID=”txtInvisible” runat=”server” Style=”visibility: hidden; display: none;” />

In this way, when the visitor express the Enter key, your first button web control will be fired.

[update: if you have multiple button web controls and want to control which one to be fired while the visitor hits the Enter key, please read on my next post]

Related posts

How to use XML Sitemap plug-in with WordPress MU

A couple months ago, I wrote a blog post in my Chinese blog about my own experience of configuring XML SiteMap plugin in the WordPress MU. It turned out that a lot of MU owners had the same problem before. So I decided to re-write it in English and share with you here.

I guess you should be familiar what the Google SiteMap is if you would like to increase your website/blog’s rank in search result. And you are using WordPress as your blogging platform, you might be interested in a plug-in called Google (XML) Sitemaps Generator for WordPress, which can allow you to easily generate Google XML SiteMap within your blog. But unfortunately the XML Sitemaps Generator (version 3.0.3) I used was not developed for WordPress MU. By default, it could only generate the XML sitemap for the primary blog not all other blogs in your WordPress MU.

Well, you can try your lucks on the author’s website to see whether he/she released a newer version to resolve the issue, or you can do it yourself by changing a few lines of code as I shared below.

Continue reading ‘How to use XML Sitemap plug-in with WordPress MU’

Related posts

How to export and import MySql database

image I have tried to re-configure the old web site log analyst tools - LiveStats XSP 6.2 for a long, long time. Finally I decided to wipe all of them and re-install again. To be safe, I have to back-up all MySql data (installed by LiveStats) first. Since the server is a Windows 2000, and I could not use web interface like Phpmyadmin. Well, I can copy all *.MYD files. But I found a better way by using the the following commands came with MySQL installation.
Continue reading ‘How to export and import MySql database’

Related posts

How to resolve the Outlook Form issues

Outlook_FormIssues:

Today I got complains from one of my co-workers saying he could not open the Leave Request Outlook form, which designed by me a long while ago and put in the Oragnization Form library.

Continue reading ‘How to resolve the Outlook Form issues’

Related posts

How to protect your online passwords, a lesson from Sarah Palin

image In recent news the Internet is talking about how a college guy hacked Sarah Palin, 2008 USA vice president candidate, personal Yahoo email account. Actually there was no technical scripting or coding involved in this hack issue. What the “hacker” did was to use Yahoo’s password recovery function by answering 3 security questions. For example, Sarah Palin set up the following three security questions to help her retrieve forgotten password (actually pre-set by Yahoo!). 1), what is her birth date; 2), what is her house zip code; 3), where did she meet with her husband; In the event of her forgetting her email password, what she needs to do is to answer these three questions and reset the password.

Continue reading ‘How to protect your online passwords, a lesson from Sarah Palin’

Related posts

Hack the Wi-Fi network of Atlanta Airport is the old news

image Sometimes it is very funny to see how the Internet work. The Internet is great with its powerful penetration degrees, it can reach to anyone, anywhere and anytime. That is why we are happy to get all these unlimited information we need from the Internet. But if we did not pay attention to the information date, things will be different. I remember weeks ago, a undated news about one Airline merging had been ranked top in Google News even it was an old news. But this news item caused the stock market moving crazy for a while because people thought this airline would talk acquisition again.

But of course, today I am here not talking about something like that crazy. I just wanted to mention one blog post which has been pop-up on the Internet recently and referred to me by co-workers a couple of times.

This blog is about Hacking a commercial airport WLAN with a simple Image handler manipulation. It is great since everybody wants Free Wi-Fi. That is why it was becoming popular in digg and introduced in Lifehacker blogs. But everyone was just blindly excited and forgot the most important thing: check the publish date of this blog!

Continue reading ‘Hack the Wi-Fi network of Atlanta Airport is the old news’

Related posts

Microsoft Commercial TV ads Bill with Seinfeld 1 and 2

image Not from TV, but I viewed these Commercials from TechCrunch Website. Although there were some “do not understands” on these TV commercials, but I believe Microsoft Public Relation and their hired ads. talents. Let us wait and see what the next serials of these commercials. And most of important part,  both of Bill Gates and Jerry Seinfeld are idols to me. It is great and funny to see both of them in such long minutes commercials. Do not you think so?

I put both of the serial 1 and 2 in the post to share with you.

Continue reading ‘Microsoft Commercial TV ads Bill with Seinfeld 1 and 2′

Related posts

How to find out IP addresses of others through emails and instant messengers

image Today one of my friends asked my helps on tracing or finding out another people’s IP address. He indicated this guy(s) had his Yahoo! Messenger account and email address from some ways, then started to harass him in instant messages and emails with nasty words and graphics. My friend tried to know who this “bad ass” is(are) and where he(they) is(are) from. So a basic IP will be a starting point.

After researching and testing, I offered him some tips to find out the IP addresses from emails and messengers. But I could not guarantee the accuracy of my recommended ways since IP addresses alone could not identify anyone, especially dynamic IPs, ISP routers, and proxy could be used at the another end. So the best way is to report to the law force team and let them co-operate wit ISPs if the damage is serious. Of course, you can try these recommended ways to find out some information first anyway.

Continue reading ‘How to find out IP addresses of others through emails and instant messengers’

Related posts

New Google Browser Chrome Installed (with pictures)

Google ChromeCan not resist the media teasing about the new browser from Google - Chrome. Here is the installation I conducted today.

First of first, you need to download it from Google Chrome website which is hard for the public to find from its main site or the link from Google’s main page. The link is http://www.google.com/chrome

And you can choose Save or Open when you see the download dialog window. For me, I just used Save in case I need to install on other machines too.

Chrome Installation 1

Continue reading ‘New Google Browser Chrome Installed (with pictures)’

Related posts

Is the Read-Only attribute on OS Oracle data file a bug for Oracle 10g?

In today’s Oracle 10g training, we were asked to do a exercise on tablespace. I needed to make a tablespace Read Only and Read Write. The syntax was simple, just “ALTER TABLESPACE tbs READ ONLY (READ WRITE”. But while I was playing around, I thought what would happen on the data file after I turned on the Read Only with the tablespace. So I checked the data file (like c:\oracle\oradata\something.dbf) and found out it did not have Read-only attribute even after I altered the tablespace as Read Only. Interesting, it seems the Oracle did not look up the OS level when it deals with the tablespace read-only attributes.

To make things more interesting, I turned on the Read-Only attribute for this tablespace’s data file (Right Click, and check the Read-Only in the proprieties window). Then I went ahead to make more alterations on the tablespace, like increasing the extents size etc. The funny thing was I could see these system changes in Oracle through some dba_ views, but actually they did not take effective. Since I could not insert any new record to a full tablespace even I “successfully” increase the size in Oracle.

Not sure Oracle already aware this situation or not.

Related posts

How to create email distribute list: import contacts into Outlook contacts easily

I need to post a serial how-to in Outlook for some of my clients. This one is part of “how to create email distribute list” and copy & paste from this website.

If you have e-mail addresses or other contact information in a program and want to import the data into Microsoft Outlook, follow the steps below.

Export and Convert the Data

Use the program’s export or save as feature to save the data into a “Comma Separated Value (.cvs) file to enable it to be imported to the Outlook Contact list.

  1. Open the .csv file with Microsoft Excel or another program to prepare the data for export.

  2. The open file should be similar to the image shown below.
  3. To successfully import these addresses over to Outlook proper labels must be assigned to the enteries in the Excel file. Insert a row above the current list of entries. Name the three column headings as Nick Name, Full Name and E-mail Address appropriately.

  4. The Excel file should look like the image shown below.

  5. Save the Excel spreadsheet as a ” Comma Separated Value ” file with a .csv extension on to your Desktop.
  6. Click Yes if prompted to retain the format of the Excel file and then close the Excel program.

Continue reading ‘How to create email distribute list: import contacts into Outlook contacts easily’

Related posts

How to watch Beijing Olympics Games live overseas online

Beijing2008Since only NBC has the exclusive authorization to broadcast all Olympics 2008 games in America, and it only shows American team games at evening prime times. It is very hard to watch some interesting games at real time if they do not have American team participation and not take part in American prime time. I thought I could do it from the internet like before. But this time unfortunately the normal way of watching stream video online does not work since all official Olympics partner websites only open to China region users. That means these video sites block all overseas IP addresses from watching games live.

Continue reading ‘How to watch Beijing Olympics Games live overseas online’

Related posts