.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

what does the @ in string.Replace(@"\'","") do?

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :ASP.Net
hi,can anybody please explain me what does the @ character in the function above do?thanks guys

View Complete Post

More Related Resource Links

String.Replace With wildcard (and use whatever "wildcard" is)

Hello there,I'm hoping someone out there know a way to accomplish what I'm trying to do, because I'm currently stuck :) What I want to do is to replace lets say ##test## with Something(test)..I know that I can find ##test## by: (Though don't know whether there's a smarter way)System.Text.RegularExpressions.Regex.Replace(str, "##Test.*##", "Output")So basically the problem is to get what the wildcard (.*) is, since thats really what I need to know..Anyone with a brilliant idea how to accomplish this?

Replace string in xml without converting to varchar using SQL Server

We have a xml datatype in SQL server which gets a xml file loaded into it. We want to replace some of the content in the xml datatype, but are running into problems converting from xml to varchar(for manipulation purposes), back to xml to output. Does anyone know of a way to replace xml without converting to varchar?Thanks in advance

replace empty string with value if it is empty in ssrs

I need to place a "Days Not Calculated" of the string is empty, if it is not empty then a need to use the days calculated and put "days old" on the end of the number....SSRS 2K5 iif (Fields!AGE.Value, "", "Days Not Calculated")& " Days Old "

Replace the string after comma starts in MS SQL


Hi All

Could you anybody help me, How to replace the remaining String after the Comma Starts Using SQL Query.  Below is the data

"MediaRights, MediaRightsLink, MediaRightsCompanies, MediaRightsTypes"

EvtBids 1
MediaRights, MediaRightsLink, MediaRightsCompanies, MediaRightsTypes 1
MediaRightsLink 8
SponsorRights, SponsorRightsLink, SponsorRightsBrands, SponsorRightsTypes 3
SponsorRights, SponsorRightsLink, SponsorRightsCompany, SponsorRightsCompanyTypes 1

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]"

I need to replace a big string with more than one value



i need to replace a string like change the dataformat, Uppercase,lowercase e.t.c


Ex: I started this question on Sep/29/2010 till i didn't get any REplay.


This has to be change to ...

I Given this question on 29/9/2010 Still i don't got any replay.



How to solve like this type of issue.

Note : this is not my exact requirement, but it matches similar. My String can consists of minimum 500000 words.


replace tab in the string using regular expression

      I want to replace tab space with "|" in the string using regular expressions.
I have tried for

Dim strTabString AS string = "A             B             C "                 
TextBox1.Text = Regex.Replace(strTabString , "\t", "|")
But i m not getting the results.


Need help to replace the string


HI Guys,

From the front they are passing some id values
based on those values i want replace my string column

Like .. we have two table 

Table A

Key ID  name 

1     2    aaa  

1     3    bbb 

1     4    xxxx


Table B

Key  Description

1      aaa,cccc,bbb,xxxx,ffff...

we are joining these table based on key value

if They are passing like  2 and 3 from the front so i want replace my descrption column with related name values

in this case i need to display my description like cccc,xxxx,ffff...

When I use 


select replace(description,a.name,'') from table a join table b 

on table a .key = table b.key

and  table a.id in (2,3)

when i write like this it displaying 2 records but iwant display in single records

Please give some suggestions to solve this

Thanks in advance





T-SQL Replace at End of String



Given a String 'This is a test, this is a second test'

Is there an easy method (preferably without using CLR) to search and replace the string to remove the word 'test' but only if it occurs as the last series of characters in a string?

The end result would be

'This is a test, this is a second'






I have a string like

string str1 = 12345aaaaa~b999~c345678;

I have used str1.Replace("~b999",string.empty);

.contains recognises the substring("~b999") but is not replacing with the empty string as shown.

Any suggestion.



Replace Escape char in string


Hello all,

I have a following string

"<Grid><IO/>\n<Body>\n<B>\n<I id=\"AR1\" Def=\"R\" Panel=\"\" Id=\"1\" Name=\"Activity 1\" Prent=\"\" ResourceName=\"Emp 1\" S=\"11/26/2010 12:00:00 AM\" E=\"12/16/2010 12:00:00 AM\" Predecessor=\"0\"/></B>\n</Body>\n</Grid>"

And i want it in following form



      <I id="AR1" Def="R" Panel="" Id="1" Name="Activity 1" Prent="" ResourceName="Emp 1" S="11/26/2010 12:00:00 AM" E="12/16/2010 12:00:00 AM" Predecessor="0"/>     





It means i want to replace \ char from upper string. How can i do this. please help.

I am struck very badly. Thanks in advance. please help.

How to Encrypt Query String Parameters in ASP.NET

Encrypt Query String Parameters in ASP.NET.u can send secure data one page another page u can also use query string to encrypt

Connestion string create any database server

This links important to how to create connection string to any data base sever.

SQL Connection String

We can learn or know how can we connect the database from our .net. This will help for freshers or .NET beginners!

Built-in Functions - String Functions

String functions let you extract various portions of character strings, change the case of strings, concatenate and reverse strings and perform many other types of manipulations. All built-in string functions are deterministic with the exception of CHARINDEX and PATINDEX

abstract away the source of the connection string using a class with a static property.

ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Let's abstract away the source of the connection string using a class with a static property.

highlight string


i am looking for a function that takes two string parameters 

str1 = "hello how are you today mr john"

str2 = "how today"

and in return it shoud highlight the words "how" and "today".

Any ides? I prefer if its possible using reg expression...Thanks

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