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

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

Passing Double Quote "

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :Sql Server

Hi all,

I'm trying to passing field value adding double quote front and end for  Go To report action.

If  =fields!author_Name.value    is TEST

I want to make it as "TEST"

Tried following expression

=""" & Fields!Author_Name.Value & """


Result is   " & Fields!Author_Name.Value & "

I thought & will break "" but it is not.


Any idea?


Thank you


View Complete Post

More Related Resource Links

String StartWith double quote

hi all,my string variable first character starts with " now i want to check whether it has " or not. how to check this from Code Behind.

Passing Double Value to Function

Hi all,The scenario is this:I have a .aspx webform, with code behind to handle data entered by user, most fields are in double.At business layer, at other class, let say there is a function: public SaveData(value1 As double, value2 As double) as BooleanThus, when I call the function at code behind:SaveData(txtDouble.txt, txtDouble2.txt)The problem is when there is a empty text, it will throw an exception invalid cast to double value.Thus, I should change it to:Double value1 = 0.0 Double value2 = 0.0 double.TryParse(txtDouble.txt, out value1) double.TryParse(txtDouble2.txt, out value2) SaveData(value1, value2) I just wondering whether this is the correct way of writing it? And if I have more than 20 fields of double value, then I should declare additional 20 double value?Your input is much appreciated.Cheers!

how to double quote a control?

 How would I put quotes on the DataLink control so it outputs "\ \computer\folder" (i put a space in there between the \\ so it would show up) instead of just \\computer\folder   it generates a link but if the folder name has a space it in the link breaks so i am trying to put double quotes on it so it creates a link even if there are spaces.  Dim DataLink As New TextBox DataLink = FormViewDC1.FindControl("CDR_Data_LinkTextBox") mail.Body = "Your CDR ID#" & cdrID.Text & " status has been updated to: " & Status.Text & "<br /><br />" & "Data Location:<br />" & DataLink.Text & "<br /><br />" & "Comments:<br />" & Comments.Text & "<br /><br />This is an automatically generated email, please do not reply."  

about BULK INSERT: how to remove the double quote?

suppose the file content is:

How to let bulk insert remove the double quote during the loading? I want to load them as 1,2,3 instead of "1", "2", "3"

Data flow task and double quote escaping


I have a data flow task that I am using to import data from a CSV file using the flat file connection manager to an OEL DB connection. The CSV uses double quotes as a text quantifier. And I have enabled this option on the flat file connection, and the below example does work

EG          “Some name”

However when there is a double quote in the original text

EG          some” name     

Then the string is being escaped as

Eg           "some""  name "

Passing Linq Statement between master and content page


I usually work with windows forms, and am just starting to work with ASP.Net, so appologies if this is a dumb question!

I have a master page which has a search button on it. The results of this are built up using a Linq statement and if there are any results, I want to display the results in a contents page.

On the masterpage, I have the following code:

Private _res

    Public Overridable ReadOnly Property SearchRes()
            Return _res
        End Get
    End Property

 Private Sub DoSearch()
   'some code to get a linq result

    If res.Any Then
            _res = res
            Server.Transfer("SearchResults.aspx", True)
            'no results
            LabelNoRes.Visible = True
        End If
 End Sub

On the SearchResults.aspx page I have this code.

Dim m As pxSite = CType(Page.Master, MasterPage)
        If m.SearchRes IsNot Nothing Then
            Label1.Text = "Results found = " & m.SearchRes.Count
        End If

m.searchRes is always nothing. 

What am I doing wrong here?


Passing values in pages


Hi! Friends..

how to pass the value from one page to another page in asp.net  with out Using State Management Concepts?

Like 1. cookies


        3. QueryStrings

     With out using the above should pass the values...

Passing Data to a Cell in Excel



I have a webpage that is created in Visual Studio 2008 and programmed in C#.

I have a web form that prompts the user to enter a value into a text box.  For now, I do not have any validation on that field (I will be adding that later).

I need to pass the value that the user has entered to cell C1 of the excel spreadsheet (user_info.xls).

I understand that using excel is not ideal, but unforutnately need to try to make this work with the excel spreadsheet.

I do not have any code for this yet, because I honestly do not know how to begin.

The action of poulating the excel spreadsheet will be intialized from the On Click event of a Submit button.

Any suggestions would be much appreciated.

Thank you in advance for your assistance,


Passing HTML values from asp.net to asp


 We have a part of our website which is coded in classic asp. This takes the values of a login page (asp.net)  which uses 

<input type="text" /> to hold the values and then submit them to the asp page using the following line of code -

<input type="submit" value="Login" onClick="this.form.action='<%= SubmitURL() %>/login/login_user.asp?Type=Login&amp;this.form.encoding='application/x-www-form-urlencoded'; this.form.submit();" />

The asp page then retrieves the values using the code -

Value1 = Request.Form("Val1")

We now have a requirement to pre-populate the login values to provide an automated login process but don't want to change the older asp code. When we try to assign values to the input text in the asp.net page by assigning the value runat="server" the login fails as it does not seem to carry over when the page is submitted.

Is there a way where we can pre-populate the html textbox without making it unavailable to the asp page?


passing page title through a param


Hello all,

   I am new to ASP.NET, and was wondering how to pass a Page title through a parameter.  In classic ASP I could just use something like: <title><%=Pagetitle%></title> but I cannot seem to get this to work in ASP.NET. 

Thank you in advance,

The New Guy... Smile 

Passing Primary Key to User Control to Display Record Detail


I'm building a user control to display detail information on a parent record. The user control will be displayed via an Ajax Modal Popup. The user control works and is displayed when expected. The problem that I'm having is that I'm not able to pass in the primary key for the parent. The control is displayed via the _ItemCommand event of a Repeater. In the markup for the user control, I explicity set the ContactId to 0 to avoid an error when the control loads (its still underdevelopment, eventually that I'll check if the value is valid).

I was assuming that I could change the property in the _ItemCommand event, but obviously its not working.

In the Page_Load event this code successfully sets the ContactId property of the control. The _ItemCommand event appears to set the value. However when I set a test label on the user control to the Me.ContactId, its showing '0' as if it was never passed in.

        UserControlContactDetail.ContactId = "1462"
        test.Text = UserControlContactDetail.ContactId

    Protected Sub RepeaterDirectory_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles RepeaterDirectory.ItemCommand

Protected Sub RepeaterDirectory_ItemCommand(By

file not passing to controller


 I am getting an null referance on file, what am I doing wrong. 

<% Html.EnableClientValidation(); %>
<% Html.BeginForm("AddMedia", "Pattern", new { id= Model.Pattern_Guid} , FormMethod.Post, new {enctype = "multipart/form-data"}); %>
<%: Html.ValidationSummary(true) %>
    <%: Html.Label("height") %>
    <%: Html.TextBox("height") %>

    <%: Html.Label("width") %>
    <%: Html.TextBox("width") %>

    <%: Html.Label("Media") %>
    <input type="file" id="Media" name="Media" />
    <input type="submit" name="btnAdd" value="Add" />
<% Html.EndForm(); %>

controller code:

        public ActionResult AddMedia(Guid id, HttpPostedFileBase file, FormCollection collection)
            string mimeType = file.ContentType; //  Null Exception here ..

Passing Parameters through sub reports



I am trying to use a parameter field where there is a subreport in my main report but i keep getting the error "subreport cannot be shown" when running the report. Any ideas please.

p.s - I have just set the parameters the same in the subreport as the main report.



Passing Textbox Value to ContextKey in AutoCompleteExtender



I'm trying to use the contextKey in the AJAX AutoComplete tool but there is a problem with regards to passing the contextKey value to the method located in the web service file.

Let me describe how my web form is organised.

There are two textboxes. One of them has the AutoComplete tool. The user enters a word in Textbox1 (which does not have the AutoComplete tool). Afterwards, when he clicks in TextBox2 (which has the AutoComplete tool) and starts to type, the AutoComplete tool will show him the close matches. Now, the items in the AutoComplete menu are retrieved from a SQL database. The Select command (of the AutoComplete which is in the web service file) returns values based on the the value of TextBox1 in the main forum.

This is the client-code of AutoComplete 1:

<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" 
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