few questions (asp.net with C#)

Discussion in '.NET' started by redking12, Jun 24, 2009.

  1. redking12

    redking12

    Joined:
    Jun 24, 2009
    Messages:
    2
    hey all, thank you for helping and sorry for my english.

    im building a website for a school project.
    i want to build a dynamic page which will show the users list.
    to do this page dynamic i am using Response.Write
    now, if i am writing in the response.write something like this
    Response.Write("<input type=text id=t name=t runat=server/>");
    i cant get the variable(of course i cant).
    how can i get it and the page will still stay dynamic.

    another thing:
    when i write some html in response.write (with name, just like the example above) in the Page_Load funciton, and trying to get the value of this input after postback it seems like it doesnt exist. i mean something like this
    if (IsPostBack)
    {
    string s=Request.Form["t"];
    }

    (after the post back i compared the string s to null and it was true)

    if the response.write is not in page_load i can get it's value.

    what i was trying to do is checkbox for each user - i succeed. but i couldnt get the value of the checkboxes(to delete the users that have been checked). i succeed to do that in <% %> in the design part of the page.

    third question:
    on the same page, i want to do the following thing:
    when the admin is double clicking on a userName(or something else) it will change to a textbox(currently its a text in a simple table - in <td>), then the admin write in the textbox another userName that does not exist(to change the current userName name) and then he enter the enter key. now the text that was in the cell will change into what the admin wrote. i succeed to do that with javascript, but my meaning is to change the username which is in the database- it means i dont have the access into the database from the javascript. the html i wrote in javascript is this one:

    Code:
    <form id="form1" runat="server">
        <script type="text/javascript" language=javascript>
        function C()
        {
            document.getElementById("t1").innerHTML="<input id=\"hte\" type=text size=7 maxlength=7/  onkeypress=\"{if (event.keyCode==13)Ggg()}\">";
            
        }
        function Ggg()
        {
            document.getElementById("t1").innerHTML=document.getElementById("hte").getAttribute("value");
        }
        
        </script>
        <div dir=rtl align=center>
        <table border=1>
        <tr>
        <td id=t1 ondblclick="C()">
        User Name
        </td>
        <td>
        Password
        </td>
        </tr>
        </table>
        </div>
        </form>
    
    so what i want to ask is if there's a function like "ondblclick" in C#

    thank you!
    redking12, Jun 24, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William Parker
    Replies:
    3
    Views:
    552
    Hans Kesting
    Jun 25, 2004
  2. webmaster@1stmiami.com

    asp.net 2.0 a few Noob questions

    webmaster@1stmiami.com, Sep 18, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    397
    webmaster@1stmiami.com
    Sep 18, 2006
  3. padh.ayo@gmail.com

    Few Questions (HW questions already answered by me)

    padh.ayo@gmail.com, Dec 5, 2006, in forum: C Programming
    Replies:
    10
    Views:
    538
    jjds101@yahoo.com
    Dec 6, 2006
  4. Murali
    Replies:
    2
    Views:
    544
    Jerry Coffin
    Mar 9, 2006
  5. Jeff
    Replies:
    7
    Views:
    112
Loading...

Share This Page