.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

A Href removing space when passing a string in a email

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :SharePoint
In an email action I'm building a string using an <A href.  I'm working with a list called Document Sets and also a column called Document Set.  I'm passing to a page the current document set in order to filter a web part. 

Here is the example

<A href="http://test.net/sites/r3bs/DocSetPAHO/Site%20Pages/dynamic.aspx?DocumentSet=<%Document Set%>">Click here to review the items.</A>

The problem is that when the document set column data contains a space (such as Company Overview), the email removes the space between Company and Overview (as seen below).  If I add the Document Set column to the email directly it displays fine with the space 

[%Document Sets:Document Set%]


I've tried storing the value to a workflow variable but it still removes the space in the actual email.

View Complete Post

More Related Resource Links

How to send an email with information in query string


First I will say I googled (Binged to make Bill happy) for this but could not find anything, perhaps I am not stating what I need correctly;

I have a website that a customer creates orders (for a printing company) and after the order, I would like to email the customer a link to view the status of their order;

I need to send the CustomerID in the link so on the returning page if a CustomerID is detected in the querystring, I "auto login" the client and open the "Dashboard" for the order page for that customer.

Can anyone point me in the right direction as to how to send the link and how to parse the querystring to get the values from the link;

Thank you if you can point me in the right direction.

get the string of 6 numbers following a dash and a space

I need to retrieve a string of 6 numbers which following a dash and space e.g - "John Smiley - 023112 - California" I would like to get the "023112" part

Text Calculation - Removing all text after space

I have a list with workflows that was created for one of our clients that allows them to enter some information and the workflow takes care of sending emails to the necessary recipients as well as notifying the person the task is assigned to when it has reached a certain status or age. The "agent name" colum contains the agent's first and last name (ie John Smith).  I am wondering if there is a way that in the workflow, when an email is generated, if I am able to remove the last name using some sort of text calculation.  The reason I would like to try and do it this way if possible is that if I add the Columns Agent First Name and Agent Last Name, the current Agent Name colum that is being used to generate the agent's name in the email will now not be the correct column to use for this information and the 100s of entries already in the lists will not send out emails properly. Does anyone have a suggestion for this, or know some sort of text calculation formula that I can use to remove the last name from the lookup in the email?

Passing String to Rdlc's TextBox

Hello  I am pretty new to reporting services. Now i have something like this. on the .cs file, i have a fullName lets say String fullName = "John Smith", Now I want to pass this string to the report's textBox and show this value on this textbox.   How can i do this? 1.How should i write in .cs file? 2. How should i set the expression for the textbox?   Thank you very much. It is very urgent! Please help!

Passing an List to my Action

    public ActionResult RenderMyThing(IList<String> strings)     {         return View("RenderMyView");     }     Somebody will come to my page, RenderMyThing.aspx ... and I always want to pass a list of strings         routes.MapRoute("MyRoute", "RenderMyThing.aspx", new { controller = "My", action = "RenderMyThing", new List<String> { ... } });    Is this possible?

Passing arguments value to wpf application through email link




   i have requirement that,  i need to open the wpf application with email link and along with  i need to pass value to wpf application. i can invoke the wpf application from email link. but i cant pass the paramenter to wpf application from email link as a command line parameter


 any idea..



Approval Workflow email truncating space in folder name


Hello all-

I am programatically starting the approval workflow on a doc in a document library.  MOSS 2007.

That doc is in a sub folder of the libary.  The sub folder has a space in the name.  For example, the doc library name is Documents.  The sub folder name is 1.0 General.

When starting the approval workflow on a doc in this libary, the link that appears in the email message does not maintain the space in the folder name.  It does maintain the space in the doc library name.  For example, the link appears as http://servername/sitename/Documents/1.0General/Doc1.docx, but it should be http://servername/sitename/Documents/1.0%20General/Doc1.docx.  Any ideas what is happening and how to resolve this.

Email is Lotus Notes server and client.



problem in passing string array from activex dll to JavaScript


I do have a problem in passing string array from activex dll to JavaScript. i need to implement a methos as 

C# : 

Replace space from string - REGEX.



I have some problem with RegEx.

I have text:

"something here [tagQuote=Name of Author]bla bla bla[/tagQuote] something here"

And now I want to replace all the whitespace character in quote attribute with "%#%#%#%".

So I want to have: [tagQuote=Name%#%#%#%of%#%#%#%Author]bla bla bla[/tagQuote]

So remove all of the whitespaces between "[tagQuote=" and "]...[/tagQuote]"

Passing UTF-8 encoded string to SOAP


I am using a third party Web Service. I am passing a string to a function in that service, that string, which i am reading from a UTF-8 text file. The problem it that the string contain some non ASCII characters.

Now if i save that text file to ANSI format, read it in a string and pass that string to Service then it works smoothly but with UTF-8 encoded string the service throw exception "The request failed with HTTP status 400: Bad Request."

Long story short

  1. NON ASCII characters
  2. UTF-8 encoding
  3. SOAP

I am using ASP.NET.

Third party sevice is in java. I also tried it by making a web service in .net, but there was issue there too.

Passing SQLDataSource results to vb string


Please help, have been banging head over this for a while.

How can I get the distinct result from a SQLDataSource (in this case a URL) into a a vb string

The SqlDataSource only delivers on result and is dependent upon a drop down list which is databound to the same table

I have tried a very messy way of putting it into a label in a form view then trying to reference that as a object

 Dim strurl as string = Formview1.Itemtemplate.Itemtemplate.URLlbl.text etc........ but this won't work

There must be a way to directly pull the data from the result of the SQLDatasource isn't there??

I am trying to pull the URL to pull an xml into a feed aggregator

Any help would be much appreciated

reposted with no help: passing a string parameter to a web method


I have a web form (html) and I'm trying to pass a single string as a parameter to my web method, (this should be simple but no one can seem to answer me)

<script type="text/javascript" language="javascript">
        var qs = new Querystring();
        var v1 = qs.get("TorVName");
        //var jsonData = JSON.stringify(v1);  
        //var list = v1;
        //var jsonText = JSON.stringify({ list: list });
        $().ready(function() {
                type: "POST",
                url: "Default.aspx/GetColumns?TorVName=" + v1,
                data: {},
                contentType: "application/json; charset=utf-8",

Removing standard text from custom feedback process email notification


My workflow has a Start Feedback Process action, which contains some pre-defined instructions. One of my instructions is to use a particular link to open the workflow history page – I have added this to force the user to open the form via the workflow history page (we're using Forms Services) because the email’s default link opens the form in the InfoPath client, not the browser. It also allows the user to be returned to the page where they will complete their workflow task (we're trying to make navigation as easy for them as possible).

Although I have defined my own set of instructions, the email notification I receive includes some standard text that links to the InfoPath form’s xml file. I don’t want users inadvertently clicking the “To complete this task…” link at the bottom of the email and having the form open in InfoPath. Here is an example of the email I’m referring to:


RegEx: converting email address to mailto link in a string using VB



i have tried various ways to accomplish this, but to no avail.  I don't know how to generate the replacement text (mailto link) so I just used a bunch of x's until I can figure it out.  Here is what I have (which currently not replacing emails in string):

Here is my Code behind:

        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load


            Me.lblText.Text = DAL.PortLog.PortLogs.PortLogToHTML(Me.TransitID)
        End Sub

Here is the called function to replace email addresses:

    Public Shared Function ConvertEmailToMailToLinks(ByVal textToConvert As String) As String

        Dim pattern As String = "\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b"
        Dim input As String = textToconvert
        Dim replacement As String = "xxxxxxxxxXXXXxxxxx"  'test
        Dim rgx As New Regex(pattern)
        Dim result As String = rgx.Replace(input, replacement)

        Return result

    End Function

Here is the DAL code:

Problem passing local variable for Approvers email in customised Approval workflow


I am building an Approval workflow using SPD and have used the Start an Approval Workflow task action.

The workflow works on a change register and looks up different list of approvers assigned to change items.

Using Local Variables, the look up assignment works fine.

My problem is that when I pass the Approvers variable to the email at the end of the workflow (the on Current Item with... part) it appears the variable in empty?

I have used the approach of adding a variable check in the content of the emails - as the workflow sends the emails anyway. The lookup works fine - it’s just the email at the end of the process that does not seem to be able to see the contents of the variables that are shown to be set earlier.

How to add 2nd parameter to query string in href


I have two datakeys in my gridview - TM_ID and DEPT_ID.  I currently have an Edit button opening a jquery thickbox popup but passing only the TM_ID into the URL.  I need both keys in my URL.  How do I add the DEPT_ID key to the Eval statement below?


              <a id="btnShowPopup" runat="server" class="thickbox" title="Timer Details"
                   href='<%# Eval("TM_ID", "TimerDetail.aspx?TM_ID={0}&TB_iframe=true&height=320&width=500") %>' >Edit</a>




Passing connection string to Enterprise Library DAAB 3.1


The company I work is considering to use the Enterprise Library Data Access Application Block. The problem is an internal policy that forces all company systems to get the connection string from a sql server.

Is there any way to just pass the connection string to the Data Access Application Block instead of getting it from the app.config or web.config?

I dont see any overloaded methods on the DatabaseFactory.CreateDatabase() method. Pointers please!

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend