473,395 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

HTML POST problem

I am creating som pages in visual basic.NET. In one page I have a list
of items, which are collected from a database. Now, for each list
item, I was thinking of adding a button that the user can click on,
and be sent to a new page(i.e. HTML post). And on the new page I will
need to know which item in the list the user clicked on, so the button
needs to have an exclusive id of some kind. How can I do this, and is
there an alternative way to do it?

I want to avoid sending variables in the URL (html GET), as it may be
a security issue.

Any help would be appreciated
Nov 18 '05 #1
4 1158
Hi, Yngve H,

Why don't you consider doing it in one aspx page? Like this:

- Set the CommandName and CommandArgument to some useful combination for
each button;
- Set all the buttons to have the same handler for the Command event;
- In that handler do what you intend to do in the second page with your
current design.

Have a look at the example for the Command event:

http://msdn.microsoft.com/library/en...mmandtopic.asp

Hope this helps
Martin
"Yngve H" <yh*****@yahoo.no> wrote in message
news:77**************************@posting.google.c om...
I am creating som pages in visual basic.NET. In one page I have a list
of items, which are collected from a database. Now, for each list
item, I was thinking of adding a button that the user can click on,
and be sent to a new page(i.e. HTML post). And on the new page I will
need to know which item in the list the user clicked on, so the button
needs to have an exclusive id of some kind. How can I do this, and is
there an alternative way to do it?

I want to avoid sending variables in the URL (html GET), as it may be
a security issue.

Any help would be appreciated

Nov 18 '05 #2
Can you elaborate on what you mean by a "Security issue"? Regardless of
whether you GET or POST, an end-user can see and/or tamper with the values
their browser is sending.

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

"Yngve H" <yh*****@yahoo.no> wrote in message
news:77**************************@posting.google.c om...
I am creating som pages in visual basic.NET. In one page I have a list
of items, which are collected from a database. Now, for each list
item, I was thinking of adding a button that the user can click on,
and be sent to a new page(i.e. HTML post). And on the new page I will
need to know which item in the list the user clicked on, so the button
needs to have an exclusive id of some kind. How can I do this, and is
there an alternative way to do it?

I want to avoid sending variables in the URL (html GET), as it may be
a security issue.

Any help would be appreciated

Nov 18 '05 #3
I have not been totally clear in my question, for that I apologize.
The case is this: I AM using .aspx pages, in which I'm using VB.NET
for scripting. Now, I already have a <code><form
runat='server'></code> on the page, so I can't make another one. Which
means i must use a normal html form (or some other asp control) for
sending data to a new page. Anyway, the list consists of a varying
number of items, depending on the users query to the database. So,
assuming I can only use a standard html form (which doesn't have much
functionalty), I can't give each item an unique ID, because that
wouldn't tell the next page which button got clicked on. But I
eventually solved the problem: I make a new identical html form for
each line in the itemlist, which each has a <code><input
type"hidden"></code> tag with a value that identifies the listitem.
That way, the next page will automatically know which form got clicked
on, and which input tag it shall retrieve an identifier from. Phew :)

But I'm sure there's an easier way to to it, but like I said, I can't
use a serverside form. And I want to avoid clientside scripts, because
many only work in internet explorer.

Thank you for the response.
"Martin Dechev" <de*******@hotmail.com> wrote in message news:<e4**************@TK2MSFTNGP11.phx.gbl>...
Hi, Yngve H,

Why don't you consider doing it in one aspx page? Like this:

- Set the CommandName and CommandArgument to some useful combination for
each button;
- Set all the buttons to have the same handler for the Command event;
- In that handler do what you intend to do in the second page with your
current design.

Have a look at the example for the Command event:

http://msdn.microsoft.com/library/en...mmandtopic.asp

Hope this helps
Martin

Nov 18 '05 #4
I only mean that I don't want the user (or anybody else) to know
anything about the identifier data in the database. And an URL is more
visible than a 'post' dataset.
"Eric Lawrence [MSFT]" <e_********@hotmail.com> wrote in message news:<ud**************@TK2MSFTNGP09.phx.gbl>...
Can you elaborate on what you mean by a "Security issue"? Regardless of
whether you GET or POST, an end-user can see and/or tamper with the values
their browser is sending.

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: sammmista | last post by:
hello experts, Plz dont treat this as another newbie query , i did my homework but still getting nowhere :( :( :( Trying to learn PHP on Fedora core 1 (PHP 4.3,MySQL,HTTPD).Unable to post data...
18
by: Shannon Jacobs | last post by:
Trying to solve this with a regex approach rather than the programmatic approach of counting up and down the levels. I have a fairly complicated HTML page that I want to simplify. I've been able to...
8
by: yawnmoth | last post by:
i've seen a few html forms, whose textarea's have text in them, and which reset when you click in that textarea... how can i do this? also, say my form has two different variables (namse, or...
17
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
7
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant"...
0
by: bp_jobemail | last post by:
I'm trying to use PHP to wrap the output of an HTML form before it goes into a precompiled C cgi script. Essentially, the company that I work for uses a purchased precompiled c program for their...
9
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. For a...
12
by: vietgurlqt | last post by:
I don't what is wrong my site but some of my members cant view it on firefox. I been browsing the net for answer but i havent find the solution. Some said add <!DOCTYPE HTML PUBLIC "-//W3C//DTD...
3
by: computer_guy | last post by:
Hi Everyone, I run into a problem. I am trying to write an aspx that can dynamically generate an image based on some input parameters. Things are very simple if the size of the parameters is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.