PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average.

Changing CodeBehind to Inline for ASP.NET site

 
 
The Dubious Khelair
Guest
Posts: n/a
 
      17th Jun 2012
-----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-----
 
Reply With Quote
 
 
 
 
The Dubious Khelair
Guest
Posts: n/a
 
      17th Jun 2012
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.

The Dubious Khelair <(E-Mail Removed)> wrote:
> 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.

 
Reply With Quote
 
 
 
 
The Dubious Khelair
Guest
Posts: n/a
 
      21st Jun 2012
-----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 <(E-Mail Removed)> wrote:
> 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-----
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inline Code (i.e. no codebehind) and Wilson's Master Pages (.Net 1.1) gr8oblivion Microsoft ASP .NET 0 16th Apr 2007 01:17 AM
Codebehind vs inline javascript JJ Microsoft ASP .NET 1 28th Jul 2006 02:09 PM
Mix Inline and Codebehind? xenophon Microsoft ASP .NET 1 20th Jan 2006 05:37 AM
DataGrid Efficency of setting embeded control properties inline or with codebehind Earl Teigrob Microsoft ASP .NET 1 9th Jul 2004 04:56 PM
codebehind with no inline Gary Brewer Microsoft ASP .NET 1 23rd Jan 2004 02:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:52 AM.