View Complete Post
Need Regular expression
which allows alphanumeric along with special characters like & - _ with only one space between the letters.Special characters should not be at start and at the end of the input string.There should not be 2 successive special
following scenario should accept:
asdd ads add
Following Scenario should not accept:
only special characters
Please suggest solution for above scenario.
I'm trying to strip illegal characters out of an XML string before I send it off to a public web service. The xml will look something like this:
<field name="notes">This is a note. Any character could appear here</field>
I need to pull out any ampercand (&) charachters in the any of the fields, as well as any < or > characters, which would make the XML unreadable.
I've tried it like this:
Private Shared Function cleanQuery(ByVal queryNode As String) As String
Dim root As XElement = XElement.Parse(queryNode)
For Each x As XElement In root.Elements
x.Value = x.Value.Replace("&", "&").Replace("<", "<").Replace(">", ">")
That doesn't work so well. I get the error stating:
There are multiple root elements. Line 1, position 15.
I tried wrapping the XML in a single root element, like this:
Private Shared Function cleanQuery2(ByVal q
On my web application, I display information in different languages. Everything works fine in IE compatibility mode and FireFox but it shows boxes for chinese/japanese languages. I am pretty much having the same issue as described here
Thanks for your help.
Can anyone tell me the best way of storing Japanese characters through ASP.NET.I have to put characters into a asp:textbox on one page, which saves it to an Access DB.On a second page I want to display the content in a asp:label.
Should I store the characters directly to the database or should they be encoded, andhow do I encode the characters?
In my web.config i have:
<globalization fileEncoding="ISO-2022-JP" requestEncoding="ISO-2022-JP" responseEncoding="ISO-2022-JP" culture="ja-JP" uiCulture="ja-JP" />
On the display page I have:
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=shift_jis">
I have created a image upload for our ID card system to allow users to upload new images, edit them and submit for approval. This is all working well with a combination of asp.net (c#) and jquery to give a seemless editor etc.
We have had a few users who I cannot believe have scanned a photo of themself and then just submitted it with the A4 page of white and little photo.
I am wondering if anyone can help with a suggestion on how I could possibly reduce the load of these coming through (I can't believe they can be this stupid), it stipulates UK passport standards.
Would my only option be to check for a single continues colour that occurs and if it reaches a certain percentage point say 60% then to just send back an error stating they need to crop the image.
Can anyone help with providing sample or that I can use to move this one on.
I am still in disbelief on this one. the other one is they take a photo of whole body and other in it and cut straight down middle chopping the people out but supplying a photo that no use for an id photo card....but that I can't imagine being solved programatically as I need to determine where their face dimensions are and what percentage of the actual photo is taken up by it and if it below a threshold reject it.
I am using aspose.slides to create PPTx's. Some of the process involves loading jpg's from another server and including them in the presentation. This works fine in my development environment. When I upload the site to its server, the jpg loading fails.
I am trying to access jpg's on the other server by:
oFS = New FileStream(sFile, FileMode.Open, FileAccess.Read)
This causes an access violation error when run from the server.
I also boiled the code down to reading the file directly:
oImg = System.Drawing.Bitmap.FromFile(sFilePath)
This causes a file not found error.
We have narrowed the problem down to the fact that the File Path has a space in it. How does one solve this problem (while still keeping the space, there is a lot of legacy data)? I have tried replacing the space with %20 or +. I have tried using Server.UrlEncode. The error message always comes back with the encoding in place (like no decoding
I am working on a site where I use the Split function on a string.
To make sure I used a separator character that I do not use anywhere in the data I selected the character 'ÃÂ£'.
This worked fine in Firefox and Safari, but in IE8 I get an 'Index out of range' error, so apparently the 'ÃÂ£' character is not handled correctly.
I changed the separator to ';', and then it works fine.
i have a string like this sravani/, asdfff/, lsdsf/i want to remove last character '/' in the above string...which function can i use?pls help me....
Custom field types provide a powerful way to define a reusable SharePoint column definitions.
MSDN Magazine May 2009
Learn how to enable an auditing solution for Windows SharePoint Services (WSS) 3.0 with customized control pages in Microsoft Office SharePoint Server (MOSS) 2007.
MSDN Magazine September 2008
Here's a custom branding solution for SharePoint sites that integrates Master Pages and CSS files at the level of the site collection.
MSDN Magazine July 2008
See how to use Word to capture a VBA macro and use Visual Studio Tools for Office to wrap it up into a deployable Word add-in.
MSDN Magazine May 2008
Ted Pattison shows how to use a new STSDEV utility to set up and deploy SharePoint development projects in Visual Studio in an easy and repeatable manner.
MSDN Magazine March 2008
This month Ted Pattison presents an overview of programming security and permissions for Windows SharePoint Services 3.0.
MSDN Magazine February 2008
Windows SharePoint Services (WSS) 3.0 provides a new and improved infrastructure for handling server-side events. In this installment of Office Space, we look at techniques for hooking up Before Events and After Events using both Features and code.
MSDN Magazine November 2007
WSS 3.0 introduces a new deployment mechanism that lets you move your development efforts into a staging or production environment.
MSDN Magazine August 2007
MSDN Magazine May 2007