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:
so what i want to ask is if there's a function like "ondblclick" in C#
thank you!
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!