Calling a function in .net

Results 1 to 2 of 2

Thread: Calling a function in .net

  1. #1
    Join Date
    Dec 1969

    Default Calling a function in .net

    First I must say that this is my first experience with using I&#039;ve worked with classic asp for years and I&#039;m just now starting to get my feet wet with Something that was simple for me with classic asp has me stumped in .net.<BR><BR>I&#039;ve got a simple little function that I&#039;ve used for years that &#039;toggles&#039; the background colors of table rows when I&#039;m writing out a lot of data. This makes it easier to tell what row of data your on. The function looks like this:<BR><BR>function togglebg<BR> if bg = "" then<BR> bg = "#EBEBEB" <BR> else<BR> bg = ""<BR> end if<BR> <BR>end function<BR><BR>I set the background color of the row = bg and then right before every rs.movenext I call the function by doing &#039;togglebg()&#039; When I try to use this .net I was getting all kinds of errors. I finally put the function in &#060;script&#062;script tags and stopped getting the errors but the function doesn&#039;t work. I&#039;m still just calling the function by putting in the togglebg() in but it never changes the background color. <BR><BR>So I guess my question is a basic one. How do I write a function and then how do I call that function from anywhere in the page? Any help will be greatly appreciated. Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: Calling a function in .net

    what are you using to learn ASP.NET? if you are posting a question like this, you got a long long long way to go to being able to code in .NET<BR><BR> (Free Resource Kit)<BR>or<BR><BR>or<BR><BR>or<BR><BR><BR>are some good starts

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts