Windows Phone Developers

Friday, June 20, 2008

Change the Target .NET Framework Version of an Existing Project

Change the Target .NET Framework Version of an Existing Project

This procedure describes how to change the .NET Framework version target of an existing project.

To change the .NET Framework version of a project

1. In Visual Studio 2008, open the project you want to change.

2. Right-click the project in Solution Explorer and then click Properties. Doing this displays the Project Designer.

3. Go to the Target Framework drop-down list. For Visual Basic projects, click the Compile tab and then click Advanced Compile Options. The Target Framework list is in the Advanced Compiler Settings Dialog Box (Visual Basic). For Visual C# projects, the Target Framework list is on the Application tab of the Project Designer. For more information, see Application Page, Project Designer (C#).

4. In the Target Framework list, click a .NET Framework version that is different than the current one for your project.








Your project now targets the new .NET Framework version. The project will unload and then reload in the integrated development environment (IDE).
Note:
If you change the .NET Framework target to an different version, you may receive error messages if your code contains references to earlier or later assembly versions. To resolve these errors, you must manually modify the references.
Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Solution for .NET Framework 2.0 update not found. The win32manifest will not be embedded.

Solved : .NET Framework 2.0 update not found. The win32manifest will not be embedded.









There are many issues when you upgrade your machine. One such issue came up with upgradation - the .NET Framework 2.0 update not found. The win32manifest will not be embedded.

One way to solve this is uninstall .NET 3.5 framework and re-install it.





Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Sunday, June 1, 2008

Extract Ref Links From WebPage using VB.Net Regular Expressions


Extract Links From WebPage using VB.Net Regular Expressions

Sub Extract_Links_From_WebPage()

Dim oReg As Regex

Dim oMat As Match

Dim sInputString As String

Dim sLink As String

sInputString = "some have links that direct to some html files

"

oReg = New Regex("href\s*=\s*(?:""(?<>[^""]*)(?<>\S+))", RegexOptions.Compiled Or RegexOptions.IgnoreCase)

oMat = oReg.Match(sInputString)

While oMat.Success

sLink = oMat.Groups("link").ToString

End While

End Sub

The above code uses Group class, which represents the results from a single capturing group. Because Group can capture zero, one, or more strings in a single match (using quantifiers), it contains a collection of Capture objects. Because Group inherits from Capture, the last substring captured can be accessed directly (the Group instance itself is equivalent to the last item of the collection returned by the Captures property).

Instances of Group are returned by indexing the GroupCollection object returned by the Groups property. The indexer can be a group number or the name of a capture group if the "(?< groupname >)" grouping construct is used. For example, in C# code you can use Match.Groups[groupnum] or Match.Groups["groupname"], or in Visual Basiccode you can use Match.Groups(groupnum) or Match.Groups("groupname").

In the above example ?<>[^""]*stores the match found by [^""]* pattern in the group ‘link’, Which can be accessed by Groups("link")

See Also
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Remove HTML Tags from String using .NET Regular Expressions

Strip HTML Tags from String using Regular Expressions

Sub Regex_Replace_Example()

Dim oReg As Regex

Dim sInput As String

Dim sOut As String

' Strip of Simple HTML Tags

sInput = "This is a HTML Text"

oReg = New Regex("")

sOut = oReg.Replace(sInput, "", "")

' Strip of Complex HTML Tags

sInput = "This is a HTML Text with images "

oReg = New Regex("")

sOut = oReg.Replace(sInput, "<[^<>]+>", "")

End Sub

See Also
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

VB.NET Regular Expression to Check URL

VB.NET Regular Expression to Validate Url


Imports System.Text.RegularExpressions

Function IsValid_URL_Address(ByVal sURLAdd As String)

Return Regex.IsMatch(sURLAdd, "(https?ftp):\/\/([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})(:\d{1,4})?([-\w\/#~:.?+=&%@~]*)/")

End Function

The above will check for URL like http://www.dotnetdud.com etc


Programming Blogs - BlogCatalog Blog Directory

See Also

Extract Ref Links From WebPage using VB.Net Regular Expressions

Remove HTML Tags from String using .NET Regular Expressions

VB.NET Regular Expression to Check URL

VB.NET Regular Expression to Check Email Addresses

VB.NET Regular Expression to Check MAC Address

Regular Expression to Check Zip Code

Validate eMail Addresses using VB.NET Function

Regular Expressions in Dot Net (.NET)

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

VB.NET Regular Expression to Check Email Addresses

VB.NET Regular Expression to Validate Email Addresses


Imports System.Text.RegularExpressions

Function IsValid_eMail_Address(ByVal sEmailAdd As String)

Return Regex.IsMatch(sEmailAdd, "[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z_+])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9}$"

End Function

The above will check for email like sales@dotnetdud.com etc and will reject sample@vbadud.c

Or -@vbadud.cm

See Also
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

VB.NET Regular Expression to Check MAC Address

Regular Expression to Validate MAC Address

Imports System.Text.RegularExpressions

Function IsValid_MAC_Address(ByVal sMacAdd As String)

Return Regex.IsMatch(sMacAdd, "/^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$")

End Function

The above will check for MAC Address like 22:13:35:67:49:ab etc

See Also
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Regular Expression to Check Zip Code

Regular Expression to Match Zip Code

Imports System.Text.RegularExpressions

Function IsValidZip(ByVal sZipCode As String)

Return Regex.IsMatch(sZipCode, "^\d{5}(\-\d{4})?$")

End Function

The above will check for U.S . Zip codes like 55001-2434. 94941-3232 etc

To Check Indian Zip codes use

Imports System.Text.RegularExpressions

Function IsValidZip(ByVal sZipCode As String)

Return Regex.IsMatch(sZipCode, "^\d{6}$")

End Function

Matches 600040, 400123 etc

See Also
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon