Set the value of a textbox

Set the value of a textbox

am 30.05.2006 22:02:06 von Dan Aldean

Hello,

I have a text box MyTextBox. How can I programmatically set the value in
ASP?
An example please.

Thanks.

Re: Set the value of a textbox

am 30.05.2006 22:16:38 von reb01501

Dan Aldean wrote:
> Hello,
>
> I have a text box MyTextBox. How can I programmatically set the value
> in ASP?
> An example please.
>
Response.write the value into its value attribute:

">

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Set the value of a textbox

am 30.05.2006 23:08:09 von Dan Aldean

Thanks Bob. But if I try later to change the value, which comes from a
database for example, how do I do it?


"Bob Barrows [MVP]" wrote in message
news:Oe$b2XChGHA.3924@TK2MSFTNGP03.phx.gbl...
> Dan Aldean wrote:
>> Hello,
>>
>> I have a text box MyTextBox. How can I programmatically set the value
>> in ASP?
>> An example please.
>>
> Response.write the value into its value attribute:
>
> ">
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>

Re: Set the value of a textbox

am 30.05.2006 23:41:35 von reb01501

Everything is done by writing to Response. I'm not really sure what you are
asking.

Dan Aldean wrote:
> Thanks Bob. But if I try later to change the value, which comes from a
> database for example, how do I do it?
>
>
> "Bob Barrows [MVP]" wrote in message
> news:Oe$b2XChGHA.3924@TK2MSFTNGP03.phx.gbl...
>> Dan Aldean wrote:
>>> Hello,
>>>
>>> I have a text box MyTextBox. How can I programmatically set the
>>> value in ASP?
>>> An example please.
>>>
>> Response.write the value into its value attribute:
>>
>> ">
>>
>> --
>> Microsoft MVP -- ASP/ASP.NET
>> Please reply to the newsgroup. The email account listed in my From
>> header is my spam trap, so I don't check it very often. You will get
>> a quicker response by posting to the newsgroup.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: Set the value of a textbox

am 30.05.2006 23:45:33 von Dan Aldean

I need a sample of ASP code, VB or Java script to set the value of a textbox
once I return values from the database or perform a calculation for example.

"Bob Barrows [MVP]" wrote in message
news:uVRFPHDhGHA.4404@TK2MSFTNGP05.phx.gbl...
> Everything is done by writing to Response. I'm not really sure what you
> are asking.
>
> Dan Aldean wrote:
>> Thanks Bob. But if I try later to change the value, which comes from a
>> database for example, how do I do it?
>>
>>
>> "Bob Barrows [MVP]" wrote in message
>> news:Oe$b2XChGHA.3924@TK2MSFTNGP03.phx.gbl...
>>> Dan Aldean wrote:
>>>> Hello,
>>>>
>>>> I have a text box MyTextBox. How can I programmatically set the
>>>> value in ASP?
>>>> An example please.
>>>>
>>> Response.write the value into its value attribute:
>>>
>>> ">
>>>
>>> --
>>> Microsoft MVP -- ASP/ASP.NET
>>> Please reply to the newsgroup. The email account listed in my From
>>> header is my spam trap, so I don't check it very often. You will get
>>> a quicker response by posting to the newsgroup.
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>

Re: Set the value of a textbox

am 31.05.2006 00:02:18 von reb01501

I would start by browsing through the messages in this newsgroup. Tons of
examples.
There are sites that provide tutorials as well.
http://www.w3schools.com/sql/default.asp

Dan Aldean wrote:
> I need a sample of ASP code, VB or Java script to set the value of a
> textbox once I return values from the database or perform a
> calculation for example.
> "Bob Barrows [MVP]" wrote in message
> news:uVRFPHDhGHA.4404@TK2MSFTNGP05.phx.gbl...
>> Everything is done by writing to Response. I'm not really sure what
>> you are asking.
>>
>> Dan Aldean wrote:
>>> Thanks Bob. But if I try later to change the value, which comes
>>> from a database for example, how do I do it?
>>>
>>>
>>> "Bob Barrows [MVP]" wrote in message
>>> news:Oe$b2XChGHA.3924@TK2MSFTNGP03.phx.gbl...
>>>> Dan Aldean wrote:
>>>>> Hello,
>>>>>
>>>>> I have a text box MyTextBox. How can I programmatically set the
>>>>> value in ASP?
>>>>> An example please.
>>>>>
>>>> Response.write the value into its value attribute:
>>>>
>>>> ">

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: Set the value of a textbox

am 31.05.2006 00:08:31 von Dan Aldean

Sorry if I was not clear. I looked into different samples over the internet,
W3school included and I could not find what I am looking for. Forgetting
about SQL, I want to change the value of an existing textbox control with a
value, different from the original one, through ASP-VBScript or JScript.


"Bob Barrows [MVP]" wrote in message
news:OLrxzSDhGHA.4104@TK2MSFTNGP04.phx.gbl...
>I would start by browsing through the messages in this newsgroup. Tons of
>examples.
> There are sites that provide tutorials as well.
> http://www.w3schools.com/sql/default.asp
>
> Dan Aldean wrote:
>> I need a sample of ASP code, VB or Java script to set the value of a
>> textbox once I return values from the database or perform a
>> calculation for example.
>> "Bob Barrows [MVP]" wrote in message
>> news:uVRFPHDhGHA.4404@TK2MSFTNGP05.phx.gbl...
>>> Everything is done by writing to Response. I'm not really sure what
>>> you are asking.
>>>
>>> Dan Aldean wrote:
>>>> Thanks Bob. But if I try later to change the value, which comes
>>>> from a database for example, how do I do it?
>>>>
>>>>
>>>> "Bob Barrows [MVP]" wrote in message
>>>> news:Oe$b2XChGHA.3924@TK2MSFTNGP03.phx.gbl...
>>>>> Dan Aldean wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I have a text box MyTextBox. How can I programmatically set the
>>>>>> value in ASP?
>>>>>> An example please.
>>>>>>
>>>>> Response.write the value into its value attribute:
>>>>>
>>>>> ">
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>

Re: Set the value of a textbox

am 31.05.2006 00:13:33 von Dan Aldean

Or maybe it's not possible to change the original value of a control through
VBScript or JavaScript?

"Dan Aldean" wrote in message
news:u2dIYWDhGHA.4656@TK2MSFTNGP04.phx.gbl...
> Sorry if I was not clear. I looked into different samples over the
> internet, W3school included and I could not find what I am looking for.
> Forgetting about SQL, I want to change the value of an existing textbox
> control with a value, different from the original one, through
> ASP-VBScript or JScript.
>
>
> "Bob Barrows [MVP]" wrote in message
> news:OLrxzSDhGHA.4104@TK2MSFTNGP04.phx.gbl...
>>I would start by browsing through the messages in this newsgroup. Tons of
>>examples.
>> There are sites that provide tutorials as well.
>> http://www.w3schools.com/sql/default.asp
>>
>> Dan Aldean wrote:
>>> I need a sample of ASP code, VB or Java script to set the value of a
>>> textbox once I return values from the database or perform a
>>> calculation for example.
>>> "Bob Barrows [MVP]" wrote in message
>>> news:uVRFPHDhGHA.4404@TK2MSFTNGP05.phx.gbl...
>>>> Everything is done by writing to Response. I'm not really sure what
>>>> you are asking.
>>>>
>>>> Dan Aldean wrote:
>>>>> Thanks Bob. But if I try later to change the value, which comes
>>>>> from a database for example, how do I do it?
>>>>>
>>>>>
>>>>> "Bob Barrows [MVP]" wrote in message
>>>>> news:Oe$b2XChGHA.3924@TK2MSFTNGP03.phx.gbl...
>>>>>> Dan Aldean wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I have a text box MyTextBox. How can I programmatically set the
>>>>>>> value in ASP?
>>>>>>> An example please.
>>>>>>>
>>>>>> Response.write the value into its value attribute:
>>>>>>
>>>>>> ">
>>
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so I
>> don't check it very often. If you must reply off-line, then remove the
>> "NO SPAM"
>>
>
>

Re: Set the value of a textbox

am 31.05.2006 00:20:27 von reb01501

Do you mean doing it in the client-side code? If so, post your question to a
client-side newsgroup.

All ASP does is generate the html that is sent to the client. Once it's
loaded in the client's browser, ASP is out of the picture.


Dan Aldean wrote:
> Or maybe it's not possible to change the original value of a control
> through VBScript or JavaScript?
>
> "Dan Aldean" wrote in message
> news:u2dIYWDhGHA.4656@TK2MSFTNGP04.phx.gbl...
>> Sorry if I was not clear. I looked into different samples over the
>> internet, W3school included and I could not find what I am looking
>> for. Forgetting about SQL, I want to change the value of an existing
>> textbox control with a value, different from the original one,
>> through ASP-VBScript or JScript.
>>
>>
>> "Bob Barrows [MVP]" wrote in message
>> news:OLrxzSDhGHA.4104@TK2MSFTNGP04.phx.gbl...
>>> I would start by browsing through the messages in this newsgroup.
>>> Tons of examples.
>>> There are sites that provide tutorials as well.
>>> http://www.w3schools.com/sql/default.asp
>>>
>>> Dan Aldean wrote:
>>>> I need a sample of ASP code, VB or Java script to set the value of
>>>> a textbox once I return values from the database or perform a
>>>> calculation for example.
>>>> "Bob Barrows [MVP]" wrote in message
>>>> news:uVRFPHDhGHA.4404@TK2MSFTNGP05.phx.gbl...
>>>>> Everything is done by writing to Response. I'm not really sure
>>>>> what you are asking.
>>>>>
>>>>> Dan Aldean wrote:
>>>>>> Thanks Bob. But if I try later to change the value, which comes
>>>>>> from a database for example, how do I do it?
>>>>>>
>>>>>>
>>>>>> "Bob Barrows [MVP]" wrote in message
>>>>>> news:Oe$b2XChGHA.3924@TK2MSFTNGP03.phx.gbl...
>>>>>>> Dan Aldean wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I have a text box MyTextBox. How can I programmatically set the
>>>>>>>> value in ASP?
>>>>>>>> An example please.
>>>>>>>>
>>>>>>> Response.write the value into its value attribute:
>>>>>>>
>>>>>>> ">
>>>
>>> --
>>> Microsoft MVP - ASP/ASP.NET
>>> Please reply to the newsgroup. This email account is my spam trap
>>> so I don't check it very often. If you must reply off-line, then
>>> remove the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: Set the value of a textbox

am 31.05.2006 00:28:57 von reb01501

My apologies. I forgot to supply the name of an appropriate group:
microsoft.public.scripting.jscript
microsoft.public.scripting.vbscript

Bob Barrows [MVP] wrote:
> Do you mean doing it in the client-side code? If so, post your
> question to a client-side newsgroup.
>
> All ASP does is generate the html that is sent to the client. Once
> it's loaded in the client's browser, ASP is out of the picture.
>
>
> Dan Aldean wrote:
>> Or maybe it's not possible to change the original value of a control
>> through VBScript or JavaScript?
>>
>> "Dan Aldean" wrote in message
>> news:u2dIYWDhGHA.4656@TK2MSFTNGP04.phx.gbl...
>>> Sorry if I was not clear. I looked into different samples over the
>>> internet, W3school included and I could not find what I am looking
>>> for. Forgetting about SQL, I want to change the value of an existing
>>> textbox control with a value, different from the original one,
>>> through ASP-VBScript or JScript.
>>>
>>>
>>> "Bob Barrows [MVP]" wrote in message
>>> news:OLrxzSDhGHA.4104@TK2MSFTNGP04.phx.gbl...
>>>> I would start by browsing through the messages in this newsgroup.
>>>> Tons of examples.
>>>> There are sites that provide tutorials as well.
>>>> http://www.w3schools.com/sql/default.asp
>>>>
>>>> Dan Aldean wrote:
>>>>> I need a sample of ASP code, VB or Java script to set the value of
>>>>> a textbox once I return values from the database or perform a
>>>>> calculation for example.
>>>>> "Bob Barrows [MVP]" wrote in message
>>>>> news:uVRFPHDhGHA.4404@TK2MSFTNGP05.phx.gbl...
>>>>>> Everything is done by writing to Response. I'm not really sure
>>>>>> what you are asking.
>>>>>>
>>>>>> Dan Aldean wrote:
>>>>>>> Thanks Bob. But if I try later to change the value, which comes
>>>>>>> from a database for example, how do I do it?
>>>>>>>
>>>>>>>
>>>>>>> "Bob Barrows [MVP]" wrote in message
>>>>>>> news:Oe$b2XChGHA.3924@TK2MSFTNGP03.phx.gbl...
>>>>>>>> Dan Aldean wrote:
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> I have a text box MyTextBox. How can I programmatically set
>>>>>>>>> the value in ASP?
>>>>>>>>> An example please.
>>>>>>>>>
>>>>>>>> Response.write the value into its value attribute:
>>>>>>>>
>>>>>>>> ">
>>>>
>>>> --
>>>> Microsoft MVP - ASP/ASP.NET
>>>> Please reply to the newsgroup. This email account is my spam trap
>>>> so I don't check it very often. If you must reply off-line, then
>>>> remove the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: Set the value of a textbox

am 31.05.2006 00:35:17 von Dan Aldean

Thanks


"Bob Barrows [MVP]" wrote in message
news:eI0QthDhGHA.1276@TK2MSFTNGP03.phx.gbl...
> My apologies. I forgot to supply the name of an appropriate group:
> microsoft.public.scripting.jscript
> microsoft.public.scripting.vbscript
>
> Bob Barrows [MVP] wrote:
>> Do you mean doing it in the client-side code? If so, post your
>> question to a client-side newsgroup.
>>
>> All ASP does is generate the html that is sent to the client. Once
>> it's loaded in the client's browser, ASP is out of the picture.
>>
>>
>> Dan Aldean wrote:
>>> Or maybe it's not possible to change the original value of a control
>>> through VBScript or JavaScript?
>>>
>>> "Dan Aldean" wrote in message
>>> news:u2dIYWDhGHA.4656@TK2MSFTNGP04.phx.gbl...
>>>> Sorry if I was not clear. I looked into different samples over the
>>>> internet, W3school included and I could not find what I am looking
>>>> for. Forgetting about SQL, I want to change the value of an existing
>>>> textbox control with a value, different from the original one,
>>>> through ASP-VBScript or JScript.
>>>>
>>>>
>>>> "Bob Barrows [MVP]" wrote in message
>>>> news:OLrxzSDhGHA.4104@TK2MSFTNGP04.phx.gbl...
>>>>> I would start by browsing through the messages in this newsgroup.
>>>>> Tons of examples.
>>>>> There are sites that provide tutorials as well.
>>>>> http://www.w3schools.com/sql/default.asp
>>>>>
>>>>> Dan Aldean wrote:
>>>>>> I need a sample of ASP code, VB or Java script to set the value of
>>>>>> a textbox once I return values from the database or perform a
>>>>>> calculation for example.
>>>>>> "Bob Barrows [MVP]" wrote in message
>>>>>> news:uVRFPHDhGHA.4404@TK2MSFTNGP05.phx.gbl...
>>>>>>> Everything is done by writing to Response. I'm not really sure
>>>>>>> what you are asking.
>>>>>>>
>>>>>>> Dan Aldean wrote:
>>>>>>>> Thanks Bob. But if I try later to change the value, which comes
>>>>>>>> from a database for example, how do I do it?
>>>>>>>>
>>>>>>>>
>>>>>>>> "Bob Barrows [MVP]" wrote in message
>>>>>>>> news:Oe$b2XChGHA.3924@TK2MSFTNGP03.phx.gbl...
>>>>>>>>> Dan Aldean wrote:
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> I have a text box MyTextBox. How can I programmatically set
>>>>>>>>>> the value in ASP?
>>>>>>>>>> An example please.
>>>>>>>>>>
>>>>>>>>> Response.write the value into its value attribute:
>>>>>>>>>
>>>>>>>>> ">
>>>>>
>>>>> --
>>>>> Microsoft MVP - ASP/ASP.NET
>>>>> Please reply to the newsgroup. This email account is my spam trap
>>>>> so I don't check it very often. If you must reply off-line, then
>>>>> remove the "NO SPAM"
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>

Re: Set the value of a textbox

am 31.05.2006 01:57:29 von Dan Aldean

That's what I wanted:




"Dan Aldean" wrote in message
news:OLLyvPChGHA.5104@TK2MSFTNGP04.phx.gbl...
> Hello,
>
> I have a text box MyTextBox. How can I programmatically set the value in
> ASP?
> An example please.
>
> Thanks.
>

Re: Set the value of a textbox

am 07.06.2006 23:21:32 von jeff

are you talking about the initial value?? if so then

someVariable = database.field.item



is this what you mean??
i am by no means a pro at this, but i think i read through what you were
trying to say
jeff

"Dan Aldean" wrote in message
news:OLLyvPChGHA.5104@TK2MSFTNGP04.phx.gbl...
> Hello,
>
> I have a text box MyTextBox. How can I programmatically set the value in
> ASP?
> An example please.
>
> Thanks.
>

Re: Set the value of a textbox

am 08.06.2006 00:19:48 von reb01501

Welcome to the group.
Unless you really have some time to kill, you might want to make a point
of reading through all the replies in a thread before replying yourself.
if you had you would have realized that Dan got his answer a week ago.

Jeff wrote:
> are you talking about the initial value?? if so then
>
> someVariable = database.field.item
>
> > value="<%=someVariable%>">
>
> is this what you mean??
> i am by no means a pro at this, but i think i read through what you
> were trying to say
> jeff
>
> "Dan Aldean" wrote in message
> news:OLLyvPChGHA.5104@TK2MSFTNGP04.phx.gbl...
>> Hello,
>>
>> I have a text box MyTextBox. How can I programmatically set the
>> value in ASP?
>> An example please.
>>
>> Thanks.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.