few questions (asp.net with C#)

Joined
Jun 24, 2009
Messages
2
Reaction score
0
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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top