Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 12th, 2007, 08:10 AM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How can i translate this VB code into C#?

How can i write the following code(written in VB.net) in C#?
<%# CType(Container.DataItem,DataRowView).CreateChildV iew(¡°MenuLink¡±) %>

can anybody help me ?
thanks a lot~!:)




 
Old April 12th, 2007, 09:22 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What are the characters around MenuLink? They aren't showing up correctly in my email or the forum (for me at least).

Try this:

<%# ((DataRowView)Container.DataItem).CreateChildView( "MenuLink") %>


-Peter
 
Old April 13th, 2007, 12:53 AM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

great thanks for planoie!~
i tried the code you gave me ,that runs well

i also tried:((DataRowView)Convert.ChangeType(Container.D ataItem,typeof(DataRowView))).CreateChildView("Men uLink")
it's also okay!~






Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I write this vb 6 code to work in vb 2008? sanderson Visual Basic 2008 Essentials 3 June 10th, 2008 01:46 PM
Urgent:hard disk serial code and vb code ivanlaw Pro VB 6 0 July 25th, 2007 04:05 AM
VB: .Exe file, serial code and activation code ivanlaw Pro VB 6 8 July 6th, 2007 05:44 AM
Can you translate? ms_sheila CSS Cascading Style Sheets 2 May 13th, 2007 08:54 PM
how to translate a code in DAO to ADO itsmenow Access VBA 2 July 7th, 2005 09:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.