Help with inline code?
- From: "brett" <account@xxxxxxxxx>
- Date: 5 Jan 2006 22:55:52 -0800
I'd like to use a conditional that checks the URL to make sure I'm not
on the localhost, which will increment the counter. I want the counter
to work only when the page is on the web server. I have the long
string below which is not fitting into the Response.Write() method as
one string.
<script language="C#" runat="server">
private void showCounter()
{
Response.Write(@"
<!-- Start of Code -->
<script type="text/javascript" language="javascript">
var sc_project=1000;
var sc_invisible=1;
var sc_partition=10;
var sc_security="7708ea54";
</script>
<script type="text/javascript" language="javascript"
src="http://www.abc.com/counter/counter.js"></script>
<noscript>
<a href="http://www.abc.com/" target="_blank"><img
src="http://c11.abc.com/counter.php?sc_project=1000&java=0&security=7708ea54&invisible=1"
alt="free statistics" border="0"></a>
</noscript>
<!-- End of Code -->
");
}
</script>
How should I be doing this?
Thanks,
Brett
.
- Follow-Ups:
- Re: Help with inline code?
- From: Dan
- Re: Help with inline code?
- Prev by Date: Re: HttpWeb Request from Class Library fails to 500
- Next by Date: RE: Problem with porting 1.1 code to 2.0
- Previous by thread: Query Data via SMS
- Next by thread: Re: Help with inline code?
- Index(es):
Relevant Pages
|