PC Review


Reply
Thread Tools Rate Thread

Could someone help me with a scripting problem vs code behind

 
 
Steve
Guest
Posts: n/a
 
      1st Sep 2003
HI I've run into a big problem


I placed my webpage scripting in the code behind


here i put out form tags with table linement stufffffffffffffff


Response.Write("<form method=post action=catalog300.aspx
id=Formpost>")
Response.Write("<br><div align=center>")

Response.Write("<table border=0 width=""90%"" cellpadding=0
cellspacing=0 height=60>")

.......
.......
ect ect

then I read a direct file in and place the page out as such

dim wf as webfile ' this structure is defined in a module


'then I loop through the file and place the lines out

FileOpen(1, "c:\files\webfile.txt", OpenMode.Random, ,
OpenShare.Shared, Len(wf))

do

s = x + 1 'x is used to get the record as well as part of the unique
name of the checkbox so I know which item was selected.......

FileGet(1, wf, x)

........ more code
........
I also place a check box out all with unique names


'qty
Response.Write("<td width=70 bgcolor=" & bg_color & " align=right
nowrap height=29>" & ar2(x) & " * " & wf.stock_unit_price)

.........more code
.........

loop until eof(1)


this works great as far as how the page looks with the data
As you know when you put things out with the response.write it places
everything at the beginning of the html, even the

''''''' the reponse.write will be outputed here before the following
html


<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="catalog300.aspx.vb" Inherits="catalog.catalog300"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


Problem is when i try to retrieve a field that was dynamically
outputed from the code behind with the code behind as such
test = request("a field")

it comes back with nothing
any help would be appreciated

PS this all works in our regular asp scripts.....

Thanks Steve

 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      1st Sep 2003
Steve,
As far as I know there is aspx.VB code behind and Asp and Aspx serverside
scripting.
When I look at your code it looks to me as serverside scripting.
Aspx.VB code behind gives compiled dll programs.

This newsgroup is for vb.net code (that is very good usable for
webdevolopment but not by using scripts).
In the newsgroup
news://msnews.microsoft.com/microsof...amework.aspnet they
talk a lot about serverside scripting.
Cor


 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      2nd Sep 2003
Steve,

First, you're still doing Classic ASP scripting when you could (should) be
taking advantage of ASP .NET compiled programming with VB .NET.

Yes, response.write still works, but you'll find you will no need it very
much (if at all). Drop labels onto your web form and simply set the text
property of them where you need to. This will eliminate the issue of the
response.write stuff going on to the page in the wrong order. You also
won't have to play with all that HTML code for alignment and breaks - - just
put the labels where you want them at design-time and set their text at
run-time.

Also, in ASP .NET, WebForms submit to themselves, not other pages (as you
used to do in Classic ASP).

As the others have said, you'll have more luck in the future in the ASP .NET
newsgroup.


"Steve" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> HI I've run into a big problem
>
>
> I placed my webpage scripting in the code behind
>
>
> here i put out form tags with table linement stufffffffffffffff
>
>
> Response.Write("<form method=post action=catalog300.aspx
> id=Formpost>")
> Response.Write("<br><div align=center>")
>
> Response.Write("<table border=0 width=""90%"" cellpadding=0
> cellspacing=0 height=60>")
>
> ......
> ......
> ect ect
>
> then I read a direct file in and place the page out as such
>
> dim wf as webfile ' this structure is defined in a module
>
>
> 'then I loop through the file and place the lines out
>
> FileOpen(1, "c:\files\webfile.txt", OpenMode.Random, ,
> OpenShare.Shared, Len(wf))
>
> do
>
> s = x + 1 'x is used to get the record as well as part of the unique
> name of the checkbox so I know which item was selected.......
>
> FileGet(1, wf, x)
>
> ....... more code
> .......
> I also place a check box out all with unique names
>
>
> 'qty
> Response.Write("<td width=70 bgcolor=" & bg_color & " align=right
> nowrap height=29>" & ar2(x) & " * " & wf.stock_unit_price)
>
> ........more code
> ........
>
> loop until eof(1)
>
>
> this works great as far as how the page looks with the data
> As you know when you put things out with the response.write it places
> everything at the beginning of the html, even the
>
> ''''''' the reponse.write will be outputed here before the following
> html
>
>
> <%@ Page Language="vb" AutoEventWireup="false"
> Codebehind="catalog300.aspx.vb" Inherits="catalog.catalog300"%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
>
> Problem is when i try to retrieve a field that was dynamically
> outputed from the code behind with the code behind as such
> test = request("a field")
>
> it comes back with nothing
> any help would be appreciated
>
> PS this all works in our regular asp scripts.....
>
> Thanks Steve
>



 
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
How to code without using VB in access scripting srini Microsoft Access VBA Modules 10 16th Jan 2008 03:18 AM
DACL code scripting help needed =?Utf-8?B?QmlsbA==?= Windows XP Security 4 24th Apr 2006 07:25 PM
Scripting problem? =?Utf-8?B?V2hlZWx6?= Windows XP General 0 1st Mar 2005 07:29 PM
Date Parsing using cmd line scripting code FOR =?Utf-8?B?R29yZG9uIENoaXU=?= Microsoft Dot NET Framework 3 19th May 2004 09:59 PM
scripting problem Jan Microsoft Windows 2000 Applications 0 26th Nov 2003 10:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:04 AM.