How do I reject getting my own comments on e-mail?
Set the value of a textbox
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > ASP web-programming > Set the value of a textbox 8 June 2006 02:19:48

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Set the value of a textbox

Dan Aldean 8 June 2006 02:19:48
 Hello,

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

Thanks.


Add comment
Bob Barrows 31 May 2006 00:16:38 permanent link ]
 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:

<input type="text" name="MyTextBox" value="
<%= "some value" %>">

--
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.


Add comment
Dan Aldean 31 May 2006 01:08:09 permanent link ]
 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]" <reb01501@NOyahoo.S­PAMcom> wrote in message
news:Oe$b2XChGHA.39­24@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:>
<input type="text" name="MyTextBox" value="> <%= "some value" %>">>
-- > 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.>


Add comment
Bob Barrows 31 May 2006 01:41:35 permanent link ]
 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]" <reb01501@NOyahoo.S­PAMcom> wrote in message> news:Oe$b2XChGHA.39­24@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:>>
<input type="text" name="MyTextBox" value=">> <%= "some value" %>">>>
-->> 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"


Add comment
Dan Aldean 31 May 2006 01:45:33 permanent link ]
 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]" <reb01501@NOyahoo.S­PAMcom> wrote in message
news:uVRFPHDhGHA.44­04@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>> news:Oe$b2XChGHA.39­24@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:>>>
<input type="text" name="MyTextBox" value=">>> <%= "some value" %>">>>>
-->>> 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">


Add comment
Bob Barrows 31 May 2006 02:02:18 permanent link ]
 I would start by browsing through the messages in this newsgroup. Tons of
examples.
There are sites that provide tutorials as well.
http://www.w3school­s.com/sql/default.as­p

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]" <reb01501@NOyahoo.S­PAMcom> wrote in message> news:uVRFPHDhGHA.44­04@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>> news:Oe$b2XChGHA.39­24@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:>>>>
<input type="text" name="MyTextBox" value=">>>> <%= "some value" %>">

--
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"


Add comment
Dan Aldean 31 May 2006 02:08:31 permanent link ]
 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]" <reb01501@NOyahoo.S­PAMcom> wrote in message
news:OLrxzSDhGHA.41­04@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.w3school­s.com/sql/default.as­p>
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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>> news:uVRFPHDhGHA.44­04@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>>> news:Oe$b2XChGHA.39­24@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:>>>>>
<input type="text" name="MyTextBox" value=">>>>> <%= "some value" %>">>
-- > 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">


Add comment
Dan Aldean 31 May 2006 02:13:33 permanent link ]
 Or maybe it's not possible to change the original value of a control through
VBScript or JavaScript?

"Dan Aldean" <danaldean@yahoo.co­m> wrote in message
news:u2dIYWDhGHA.46­56@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message > news:OLrxzSDhGHA.41­04@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.w3school­s.com/sql/default.as­p>>
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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>> news:uVRFPHDhGHA.44­04@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>>>> news:Oe$b2XChGHA.39­24@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:>>>>>>
<input type="text" name="MyTextBox" value=">>>>>> <%= "some value" %>">>>
-- >> 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">>


Add comment
Bob Barrows 31 May 2006 02:20:27 permanent link ]
 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" <danaldean@yahoo.co­m> wrote in message> news:u2dIYWDhGHA.46­56@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>> news:OLrxzSDhGHA.41­04@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.w3school­s.com/sql/default.as­p>>>
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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>>> news:uVRFPHDhGHA.44­04@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>>>>> news:Oe$b2XChGHA.39­24@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:>>>>>>>
<input type="text" name="MyTextBox" value=">>>>>>> <%= "some value" %>">>>>
-->>> 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"


Add comment
Bob Barrows 31 May 2006 02:28:57 permanent link ]
 My apologies. I forgot to supply the name of an appropriate group:
microsoft.public.sc­ripting.jscript
microsoft.public.sc­ripting.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" <danaldean@yahoo.co­m> wrote in message>> news:u2dIYWDhGHA.46­56@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>> news:OLrxzSDhGHA.41­04@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.w3school­s.com/sql/default.as­p>>>>
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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>>>> news:uVRFPHDhGHA.44­04@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>>>>>> news:Oe$b2XChGHA.39­24@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:>>>>>>>>
<input type="text" name="MyTextBox" value=">>>>>>>> <%= "some value" %>">>>>>
-->>>> 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"


Add comment
Dan Aldean 31 May 2006 02:35:17 permanent link ]
 Thanks


"Bob Barrows [MVP]" <reb01501@NOyahoo.S­PAMcom> wrote in message
news:eI0QthDhGHA.12­76@TK2MSFTNGP03.phx.­gbl...> My apologies. I forgot to supply the name of an appropriate group:> microsoft.public.sc­ripting.jscript> microsoft.public.sc­ripting.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" <danaldean@yahoo.co­m> wrote in message>>> news:u2dIYWDhGHA.46­56@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>>> news:OLrxzSDhGHA.41­04@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.w3school­s.com/sql/default.as­p>>>>>
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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>>>>> news:uVRFPHDhGHA.44­04@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]" <reb01501@NOyahoo.S­PAMcom> wrote in message>>>>>>>> news:Oe$b2XChGHA.39­24@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:>>>>>>>>>­
<input type="text" name="MyTextBox" value=">>>>>>>>> <%= "some value" %>">>>>>>
-->>>>> 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">


Add comment
Dan Aldean 31 May 2006 03:57:29 permanent link ]
 That's what I wanted:

<script type="text/javascri­pt">
document.getElement­ById('txtBox').value­="123456789"
</script>


"Dan Aldean" <danaldean@yahoo.co­m> wrote in message
news:OLLyvPChGHA.51­04@TK2MSFTNGP04.phx.­gbl...> Hello,>
I have a text box MyTextBox. How can I programmatically set the value in > ASP?> An example please.>
Thanks.>


Add comment
Jeff 8 June 2006 01:21:32 permanent link ]
 are you talking about the initial value?? if so then

someVariable = database.field.item­

<input type="text" name="someField" size="20" value="<%=someVaria­ble%>">

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" <danaldean@yahoo.co­m> wrote in message
news:OLLyvPChGHA.51­04@TK2MSFTNGP04.phx.­gbl...> Hello,>
I have a text box MyTextBox. How can I programmatically set the value in > ASP?> An example please.>
Thanks.>


Add comment
Bob Barrows 8 June 2006 02:19:48 permanent link ]
 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­>
<input type="text" name="someField" size="20"> value="<%=someVaria­ble%>">>
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" <danaldean@yahoo.co­m> wrote in message> news:OLLyvPChGHA.51­04@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.


Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > ASP web-programming > Set the value of a textbox 8 June 2006 02:19:48

see also:
patch for sqlstate (bug 1000495)
Re: for psqlodbc developers: […
Re: Log: TextAsLongVarchar=0 don't work
пройди тесты:
Do you really know yourself?
see also:
Internet Explorer - Changed At Last?
Hi!
HI!

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .