Changing CodeBehind to Inline for ASP.NET site

  • Thread starter The Dubious Khelair
  • Start date

T

The Dubious Khelair

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'd just like to apologize in advance if this is the wrong newsgroup for
this; I guess I'm still a little bit unfamiliar when it comes to the
terminology for different Microsoft technologies and where they are all
applicable.

I'm working on a project for an internship that consists of an online
survey which was originally coded by me using a CodeBehind separation of
asp elements/layout and visual basic scripting. Unfortunately due to
server configuration issues which I don't have the power to resolve
(damn the powers that be), one of the fixes that I'm forced to try
before committing to even more asinine methods of deploying this
application is switching the application from the codebehind model of
separation to inline code. This is a problem for me as I first cut my
teeth on learning asp.net website development on this application and I
have absolutely no experience in coding with the inline script model.

So needless to say I've run into a few problems trying to get this done.
I've been unable to find (due to lack of proper google-fu) any resources
that describe exactly what I need as far as procedures to convert the
working codebehind file to an inline script nugget. I've stumbled
across a few of the answers to the more obvious issues that I've had,
but I've still got plenty brewing right now. Some of the issues that
I've dealt with already are:
* proper formation of the <script> tags around the primary code block
* moving Imports statements from within the code block to within
<% ... %> blocks at the top of the page
* not being able to access form and other asp elements from within the
layout section of the page until moving the inline script to after
wherever they are declared in the XML

Unfortunately I've still got a few issues occurring at this point.
Right now I'm dealing with trying to solve why 'Inherits
System.Web.UI.Page' is being flagged as an error from within my script
block, and I know that some more are waiting to pop up as soon as I've
got that dealt with.

My question is if anybody can help me a little bit with some of these
errors and/or provide a resource/link that I can examine myself which
will more concisely point out the different changes that need to be made
when switching a web application from the codebehind to the inline
scripting model of development. I'm sure there's some out there but my
google-fu really sucks when I'm trying to find specific results like
that. Any help would be very much appreciated and I thank you in
advance.

- -Damon Getsman

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (OpenBSD)

iQIcBAEBAgAGBQJP3hL9AAoJECqJ6HQbyBt41zoQAIoXyk5MMS6oSD3y5YaFTcxk
vFA9/EXA7AXXnddRZkQMhQ060DtDyYXn8M2Q80QaHV3S/tgAEjpXxd117w5TYIn/
HSc6+1Gq68c7JNJELtCo9qZJ1VOOpuVoARQUuEix21RRnfAzsOPdWLPs11UWZdSq
BM0tm63a07RzvIgwxOzgaPhjCJxmUSBUsA2ZGuZWJ9Bk/EqoIdYxNV0gyrE+/4Gg
9l0a/CUN4hPaGPSJnaiOZ35k9w0pI/2RksrQzkHRY20NXBLUy0n+/w3NnrTDzmh/
o1llAkeR2RzatdWpfzC5YmbsExNGarAfgQvx2OQZ2t+amIcQQl4MZMO9d+j6IrOU
qPXIpUAxI4wrRaFnC85meG4KyhxXTdzfscdcDb4Hnz3km2ie6VA3l3E9UbteqyCk
k2Uelj/lGxyxSdpVyBvdoaQbRtID4r3JjRFNUhsoaagV+JGlHYGqP9WYTy3EEepo
F3kEIfH2q+xVgodQ0R69LHjeMNyn/H45TwaUsiXA4vWa4mgmYIfpNmGPmtuLXIdP
ZOtM/SRA6vpv4eJHcz/mx+/1VcDMtZThfW9uyYMLZlhOSsDynO+D2rOpXukXxDIN
sorIuy1G31lmRcTjeGBmQPOczMlZB64puYutGbP5VzpEEdwi1gPJY97eBRMcUO4S
kKD17qzllqiS52wM752p
=wuYn
-----END PGP SIGNATURE-----
 
Ad

Advertisements

T

The Dubious Khelair

Okay just as an update I seem to have things at this point to the stage
where I'm only getting 2 more errors hilighted within my inline
<script>...</script> tags. The following are hilighted as errors still:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
(where Page_Load is hilighted with green squiggles) and 'Inherits
System.Web.UI.Page' is hilighted w/blue.
 
Ad

Advertisements

T

The Dubious Khelair

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay so I'm guessing that 'this.Load += new EventHandler(Page_Load);' is
javascript that has to be defined somewhere in the page, but I'm not
sure where 'X-No-Archive: Yes' should be going. That looks like a page
header, if I'm not mistaken, and I'm really not sure where or how to
define it.

Thank you, though. Any more clarification is greatly appreciated as
well.

- -Damon

Michael Lalonde said:
X-No-Archive: Yes

this.Load += new EventHandler( Page_Load );

Michael Lalonde - Sudbury, Ontario
Food catering - jumlers.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (OpenBSD)

iQIcBAEBAgAGBQJP4sCGAAoJECqJ6HQbyBt4iyYQAJHMJiwRBd0jj0quB4aCz2Ds
av1rej1XPf0dPLwUFONaRLSKKx2ODJitSdKgssJi5aZCw0C2Iri3tROCQ4QeJX+0
vdC+mgY0epVuP9+JHg/ZLcSicQfWJlgKpC6wvhgHyIgUo72xOOQDacg3Rls8EerF
LUgXeLHUZXd5iX+CRtkCpJwNKL/HRDH+joXbGjtCbkvbVDQMaL5gabBKEk4v0PKB
CpMA5ij99+fU/eNzvNvDpVtfYyXrED+vg3sVnjdjKyYgRIjpnYX/q2Keb3ESflQS
PCn6Kh9FY6bPS+8o/bhHVGJCIq76YFJWBXcI5z27vtiXZYkbEECvUnWfWkzT5NsH
6s5SVAFgxGtiGREdUubw3IqMYTNdlR0janM/WrlOkfvOXJsxQNaExSyhzS0LhrRT
ligsO0ayNw7vK1aL6JYpAmMPPDrnQfS89yBBWdGbJ80tYvkdFTeetldHa1JKvu+w
adUdC2jzsac47Z2OWOEvD+JvULB4PmsBy7KtWHBzFISauNWGXwuWP2VpXqp3asJ1
Eu6tZgrwVJwBw1anoZChy+XrSBKBsEQQD8xxtuge+/tc3F3pbd6CdEfqcrk55zGt
TtU3GKGBeVik1seSsHCJGOEJmGK03HZcSbtBg6ZJ4MWylTdNE4CVcV5I6v5sWG50
dvhpWpPSRxiS+w6u0V3x
=xUta
-----END PGP SIGNATURE-----
 

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

Top