Get PostBack value in a webform

  • Thread starter Thread starter Smirnoff
  • Start date Start date
S

Smirnoff

Hello,
I wanna just know how to "get a value when a post back if made in a
webform ?"
If someone have the solution, it's help me verymuch
Thanks in advance
 
If you have a asp.net textbox control named txtBox on the page you
just use

txtBox.Text

to get the value of the text box. If you use an ordinary <input
type="text" name="box"/> or HtmlInput control the Request object is
used:

string value=Request["box"];

/Hugo
 
Hugo Wetterberg a exposé le 17/03/2004 :
If you have a asp.net textbox control named txtBox on the page you
just use

txtBox.Text

to get the value of the text box. If you use an ordinary <input
type="text" name="box"/> or HtmlInput control the Request object is
used:

string value=Request["box"];

/Hugo

non i'v writted it like that
for(int i=0;i<max;i++,nummb++)
{
Response.Write(string.Format("<input type=\"checkbox\"
name=\"checkbox\" value=\"checkbox\" id=\"chbx{0}\">",nummb+1));
}
i've a Javascript fonction who find the checked checkbox
something like that

<script language="javascript">
function getchbxid(max)
{
array res;
for(i=1;i<max;i++)
{
if(document.getElementById('checkboxid'+i).checked)
res[res.length] = i;
}
return res;
}
</script>
:D
And i wanna try to call this fonction from the asp.net page and trying
to get the (return res) in a string
i think i'm not very clear but i'll try
thanks for all your help

Fabrice
 
Back
Top