CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: get and set values to html controls via asp.net

  1. #1
    Join Date
    Oct 2007
    Posts
    3

    get and set values to html controls via asp.net

    Hi all,

    I have an application in asp.net (in localhost) which fetches html and php code from the login page from facebook.com. The body part goes like this:

    Code:
    <div id="book">
    <div id="sidebar"><a href="http://www.facebook.com" class="go_home"> </a><div id="sidebar_content"><script type="text/javascript">
    function quicklogin() {  document.cookie = "test_cookie=1;domain=.facebook.com";}</script>
    <div id="squicklogin">
    <form method="post" name="loginform" action="https://login.facebook.com/login.php" onsubmit="quicklogin();"><input type="hidden" name="challenge" value="a677af57d3b86876454bdefb6a4c7012" />
    <input type="hidden" name="md5pass" />
    <label><span>Email:</span><input type="text" class="inputtext" name="email" value="" id="email" size="20" onkeypress="login_form_change()" /></label><input type="hidden" name="noerror" value="1" />
    <label><span>Password:</span><input class="inputtext" type="password" name="pass" id="pass" size="20" /></label>
    Its in text/html format. I want to pass hard-coded values to "email" and "pass" fields during runtime. Is it possible?

    Thanks in advance
    Last edited by PeejAvery; October 29th, 2007 at 06:38 AM. Reason: Added code tags

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,943

    Re: get and set values to html controls via asp.net

    You can write it from the server using Response.Write().

    Code:
    <input type="text" class="inputtext" name="email" value="<% Response.Write(...) %>" id="email" size="20" onkeypress="login_form_change()" />
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)