Lower and Replace in GridView Template Column

How do you lower Eval("ThreadTitle") and replace empty spaces with '-' character in a Template Column in a GridView

<asp:HyperLink ID="lnkTitle" runat="server" NavigateUrl='<%# "/" + Eval("ThreadID") + "/" + Lower(Eval("ThreadTitle")) + "#" + Eval("LastPostID") %>' Text='<%# Eval("LastPostTitle") %>'></asp:HyperLink>

The answer is ((string)Eval("ThreadTitle")).ToLower().Replace(" ", "-") i just figured it out

Category:asp.net Views:0 Time:2012-02-11
Tags: asp.net

Related post

  • asp.net gridview template column 2009-09-24

    In my asp.net gridview, I am placing a template column which displays an image. Inside the template column I added an image control, and it successfully displaying the images from the database. I am also using paging. Paging also happening but when I

  • GridView template Column conditionally set to readonly 2011-05-05

    Is there a way to set a Template Column on a GridView to readonly from code behind. Like if test for Admin=true make readonly= false else readonly = true? --------------Solutions------------- There is no direct way to set Gridview column to readonly.

  • GridView Template Column hiddenfield value is always 0 while visibility false 2012-03-14

    I have GridView with Template Column.Inside the template column i have asp:hiddenfield. I am binding the value using Eval() method.When i am trying to access the value of hiddenfi not accesible while visibility false ASPX <asp:TemplateField Header

  • Can not set ASP.Net Gridview Template Column width to 0 2011-11-14

    In a asp.net grid view I have add a TemplateColumn and I need to set its width to 0, Even if I set it in HTML code or code behind when it displayed it in browser it has a width. How to solve this? HTML <asp:TemplateField Visible="False" ControlSty

  • How to replace/modify autogenerated columns with template columns in a gridview for ASP.net 2011-12-04

    I need to create a gridview in asp.net from autogenerated columns. I have an SQL query that pivots a table and creates a variable number of columns based on the number of different brands in the dataset. However, I need to wind up with template colum

  • Re-arrange the template column in Gridview 2010-01-06

    I have set the Datasource of my gridview in code behind and created no columns (All columns in gridview are created automatically). Then I added a template column in gridview. Now I want to change the order of my Templated column in gridview at runti

  • how to sort Gridview rows by a unbound Template column 2010-03-22

    i want to sort my Gridview rows by a template column that is not bound to any database field. This template coulmn just has a label whose text i set in code depending on a value in a different column that is databound. So am stuck on how to set its s

  • I have a gridview in wpf and have a two radio buttons and a button in template column. how do i access the status of radio buttons? 2012-01-19

    I have a gridview in wpf and have a two radio buttons and a button in template column. How do i access the status of radio buttons in the click event of the button? <DataGrid> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding Tr

  • ASP.NET GridView - Editing Dynamic Template Columns 2009-11-30

    I have created a GridView whose columns are dynamically created based on my data source. I have implemented these columns by using the approach described here.Those columns display properly on the initial load. However, I need to implement commanding

  • Asp.Net Gridview - One Column is List - Want to Show Only The Last Item 2009-08-18

    I have an Asp.Net GridView. One of the Columns is a List, but I only want to show the Last Item in the list. How can I do this? List<string> Column1 I am binding the Gridview to a business object: public Class GridObject { List<string> Co

  • How to send Row values in QueryString through link button in Template column? 2009-09-10

    I have a situation here. I have a gridView control and there are four columns in it. The fourth column is a template column containing a link button. What I want is that I want to get the values of the row against which the details link would be clic

  • Data bound drop down in a gridview template 2009-11-05

    I need to limit the values in a data bound drop down placed in a template column in a gridview based on the text in another column in that row of the gridview. I also want the dropdown to be databound. Aparently, these two things are not possible at

  • How can I do editable GridView Template Cells TextBox? 2009-12-04

    How can I do editable GridView Template Cells TextBox? --------------Solutions------------- Use a command column and set ShowEditButton="True" EditText="Edit" ButtonType="Link" In your template column use the ItemTemplate to describe what the columns

  • Dynamic Gridview Template and Unique Control (ie textbox, label) IDs? 2010-02-03

    When creating a Gridview at design time you can create a template column like this: <asp:TemplateField> <ItemTemplate> <asp:Label runat="server" ID="Label1"></asp:Label> </ItemTemplate> </asp:TemplateField> And in

  • if statement in gridview template filed 2011-05-17

    I have a gridview. its data source is a datatable that is loaded from the database. In this gridview, i have a template column. The content of this column is not directly pulled from the database but instead, i use the id of the current item to make

  • Call JQuery Success Div if Record Save/ Update successfully from GridView Template 2011-06-13

    I have one GridView Control of Asp.net and In Template column of that i have Insert & Update Link Button along with Cancel and Edit. Now, I want to fire the Query which shows the message "Records Inserted/ Updated Successfully" if Insert or Updat

  • how change visibilty of gridview template field on OnClick event 2011-07-31

    How change visibility of gridview template field on OnClick event. <gaia:Button ID="btnAdd" runat="server" Text="Add Sub Franchise" OnClick="btnAdd_Click" Visible="true" CssClass="b2" /> <gaia:Button ID="btnBulk" runat="server" Text="Bulk As

  • gridview textboxes column sum using jquery 2011-08-02

    I have a gridview having text boxes in template fields and buttons in footer, on footer button click i want to calculate the total of template column's having textboxes but i am not able to get textboxe's value.i am using following code in my aspx pa

  • Conditionally hiding an html table built inside a template column 2011-12-08

    I have built a gridview that includes one bound column on the far left and every other column is a template column that contains an html table. I do this because I need to organize 6 pieces of info neatly into each cell. However, in some cases the da

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.091 (s). 11 q(s)