referencing a hidden input box

referencing a hidden input box

am 20.01.2008 17:39:31 von Paul Hansen

Using a hidden input box to store a password for web services

input id="idpassword" type="hidden" value=" " runat="server"

throws this error
Compiler Error Message: BC30311: Value of type 'System.Web.UI.HtmlControls.HtmlInputHidden' cannot be converted to 'String'.

I would be grateful for any ideas


From http://www.developmentnow.com/g/8_2003_11_0_25_0/dotnet-fram ework-aspnet.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

Re: referencing a hidden input box

am 20.01.2008 17:44:40 von mark

"Paul Hansen" wrote in message
news:412f1477-850b-4599-80db-54ae7a09138e@developmentnow.com ...

> Using a hidden input box to store a password for web services

UNDER NO CIRCUMSTANCES DO THIS!!!!!

Do a View Source and you'll see why...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Re: referencing a hidden input box

am 21.01.2008 00:39:03 von rosoft

Hi

Don't know how to do it in ASP but in PHP you do as follows. And please can
some one tell me how to do this in ASP.NET code
since I'm transforming my homepage from PHP to ASPX.
?

$_SESSION["passwd"]=$_POST["key"]
$_SESSION["sername"]=$_POST["name"]
// This creates a cockie
// Then login to the database or what ever.
?>

In the html code I write
















User





Password





 








The only drawback that I know of os that you store a session cockie on the
local machine. The cockie is deleted once the browser is closed. This can
cause Anti Virus programs to report the page. But that's not a major deals
unless you are distributing spyware or adware. The same message appear when
I log into my bank so I can pay my bills.


Lars

"Mark Rae [MVP]" skrev i meddelandet
news:eJvOFP4WIHA.3940@TK2MSFTNGP05.phx.gbl...
> "Paul Hansen" wrote in message
> news:412f1477-850b-4599-80db-54ae7a09138e@developmentnow.com ...
>
>> Using a hidden input box to store a password for web services
>
> UNDER NO CIRCUMSTANCES DO THIS!!!!!
>
> Do a View Source and you'll see why...
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net

Re: referencing a hidden input box

am 21.01.2008 10:37:43 von Eliyahu Goldin

Apparently you are doing something like

myString = idpassword

Instead, do

myString = idpassword.Value

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Paul Hansen" wrote in message
news:412f1477-850b-4599-80db-54ae7a09138e@developmentnow.com ...
> Using a hidden input box to store a password for web services
>
> input id="idpassword" type="hidden" value=" " runat="server"
>
> throws this error
> Compiler Error Message: BC30311: Value of type
> 'System.Web.UI.HtmlControls.HtmlInputHidden' cannot be converted to
> 'String'.
>
> I would be grateful for any ideas
>
>
> From
> http://www.developmentnow.com/g/8_2003_11_0_25_0/dotnet-fram ework-aspnet.htm
>
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com

Re: referencing a hidden input box

am 21.01.2008 23:34:17 von rosoft

Could this be equal to use a IMput (Password) from the HTML toolbox in the
IDE.

As for the "myString = idpassword.Value"
Haevn't comed to that part of knowledge about C#. But since C# is a class
library that would be my "guess". It's similar i Delphi, BCBuilder, JBuilder
and probably VB as well.

Is it possible to use some in stead of the
tag. Or is I way out of line here?

Lars


A small check with
"Eliyahu Goldin" skrev i
meddelandet news:%23mg3iFBXIHA.748@TK2MSFTNGP04.phx.gbl...
> Apparently you are doing something like
>
> myString = idpassword
>
> Instead, do
>
> myString = idpassword.Value
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
> http://usableasp.net
>
>
> "Paul Hansen" wrote in message
> news:412f1477-850b-4599-80db-54ae7a09138e@developmentnow.com ...
>> Using a hidden input box to store a password for web services
>>
>> input id="idpassword" type="hidden" value=" " runat="server"
>>
>> throws this error
>> Compiler Error Message: BC30311: Value of type
>> 'System.Web.UI.HtmlControls.HtmlInputHidden' cannot be converted to
>> 'String'.
>>
>> I would be grateful for any ideas
>>
>>
>> From
>> http://www.developmentnow.com/g/8_2003_11_0_25_0/dotnet-fram ework-aspnet.htm
>>
>> Posted via DevelopmentNow.com Groups
>> http://www.developmentnow.com
>
>