Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
how to show all chacters of a string before the @ character
Cassie Mod
Jul 13 2017 6:13 AM
186
Reply
Hi ive got the following qustion.
I have a an asp.net gridview. and one colum contains the user. However all the users have a
certain const value at the end like @blabla wich i dont want to show in the gridview colum
so user was pietje@blabla and i want to show just pietje.
I have got the following itemtemplate to show the hole user, but how can i remove the chachagters after the '@' ??
This is what i got already.
<asp:TemplateField HeaderText=
"Gebruiker"
HeaderStyle-Width=
"30%"
SortExpression=
"UserId"
>
<ItemTemplate>
<asp:Label ID=
"userLabel"
runat=
"server"
Text=
'<%#Eval("UserId").ToString()%>'
></asp:Label>
</ItemTemplate>
</asp:TemplateField>
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Get Hosted Server Name
Convert Numbers to Words (String) using C#.NET