Could someone help me with a scripting problem vs code behind

S

Steve

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
 
C

Cor

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/microsoft.public.dotnet.framework.aspnet they
talk a lot about serverside scripting.
Cor
 
S

Scott M.

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.
 

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