Link to home
Start Free TrialLog in
Avatar of cafferm
cafferm

asked on

asp conversion to c# - Urgent

Hi

I am a newbie to c# and really urgently need this piece of code which is embeded into a web page converted to c#

thanks

<%       
dim i
sql ="SELECT parent,mName,mLink,menuorder from tblMenu where parent=1 ORDER BY menuorder ASC"
Set headerrs = Server.CreateObject("ADODB.Recordset")
headerrs.Open sql, conn, 3, 3
i=0
If (headerrs.RecordCount > 0) Then
         while not headerrs.eof
      Response.write("oCMenu.makeMenu('sub0" & i & "','top0','" & headerrs.fields("mName") & "','" & headerrs.fields("mLink") & "')" & vbcrlf)
      i=i+1                                          
      headerrs.movenext
           wend
end if
      
headerrs.close
%>
ASKER CERTIFIED SOLUTION
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cafferm
cafferm

ASKER

Nice one - thanks very much

Matt
Glad to help you Matt :-)