Newbie needs some help

M

Mike

I'm converting a existing .asp application to ASP.NET using Vb.NET. In my
current asp application I have javascript
grid and its populated from the ASP code using <%=dataitem%> and that
populates the rows in the grid.

How can i use the same grid and populate it with ASP.NET? Can <%= dataitem%>
be used in .NET or is the syntax different now?

NOTE: I want to keep the my current grid because of all the funcionality it
currently has, and after doing some research the Datagrid can't do what my
javascript grid currently does
thanks
 
M

[MSFT]

Hi Mike,

Regarding the question, What is the "dataitem", a server side variant? If
so, you can still use same expression in ASP.NET. For example, in code
behind, you have such code:

public dataitem as string

And you can use <%=dataitem%> anywhere in the web form.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
M

Mike

yes serverside variant

example:

select names from nametable


<%=names%> writes the value of name
 
M

[MSFT]

You can still use same expression in ASP.NET. For example:

Public Class WebForm1
Inherits System.Web.UI.Page

Public mydata As String

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

mydata = " some strings "
End Sub

End Class

HTML code:

<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<%= Mydata %>
</form>
</body>


Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top