Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 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 February 21st, 2006, 08:41 PM
Registered User
 
Join Date: Feb 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert ASP to ASP. Net

Hi,

I just started using ASP.NET, I am trying to convert ASP script to ASP.NET using C#.

ASP script:
<% If Session ("Acct") = "base" Then %>
<table>
  <tr>
    <td>
      <input type="radio" name="acct" value="base">
    </td>
  </tr>
</table>
<% Else %>
<table>
  <tr>
    <td>
      <input type="radio" name="acct" value="level 1">
    </td>
  </tr>
</table>
<% End If %>

Could anybody help me to convert this ASP script to ASP.NET using C#?

Thank you

 
Old February 22nd, 2006, 03:00 AM
Wrox Technical Editor
 
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It should be something along the lines of this:

<% if ( Session["Acct"] == "base" ) { %>
    <table>
    <tr>
        <td>
            <input type="radio" name="acct" value="base">
        </td>
    </tr>
    </table>
<% }
   else{ %>
    <table>
    <tr>
        <td>
            <input type="radio" name="acct" value="level 1">
        </td>
    </tr>
    </table>
<% } %>

You should really look into using ASP.NET's code behind techniques.

- A.Kahtava
 
Old February 22nd, 2006, 05:03 AM
Registered User
 
Join Date: Feb 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for your help. What do you mean by ASP.NET's code behind techniques? Sorry, I ask you such a dumb question. Because this is my first time coding in ASP.NET, thank you again in advance.

 
Old February 22nd, 2006, 08:11 AM
Wrox Technical Editor
 
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's a link from MS; ASP.NET Code-Behind Model Overview: http://support.microsoft.com/kb/303247/EN-US/


- A.Kahtava





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert html to pdf file by using asp.net in c# dey.susanta.kolkata ASP.NET 2.0 Professional 4 September 19th, 2016 07:20 AM
Convert an image into tumbnail (ASP.NET C#) richie86 ASP.NET 1.0 and 1.1 Basics 3 March 8th, 2007 12:37 PM
convert bytes[] into base64binary in asp.net bharat_agarwal XSLT 1 June 20th, 2006 02:04 AM
Convert ASP web application to ASP.NET Steve777 ASP.NET 1.0 and 1.1 Basics 3 June 2nd, 2005 07:26 AM
convert asp function to asp.net debuajm General .NET 0 June 11th, 2004 11:03 AM





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