hi guys i dont know how to make thread in my program , please help me :) i wanna know how to make , and work with threads , it`s better to use System.threading.thread :cool:
sajjy
Posts
-
threading -
listBox selected valueshi , i have some problem in getting the selected values of my ListBox :doh: i use some code like this :
ListBox1.SelectedValue
but it just gives me the first selected value ! my list box is in multiple mode and user can select some coises !!! how can i get the whole of selected values without using for cycle ?! -
problem on inserting non english values in DBit is ntext , i changed it to nvarchar(MAX) to see if gets better , but didn`t came true !! :doh:
-
problem on inserting non english values in DBhi guys I have some problem in inserting non english values in AJAX method (in AJAX i send information on get method) :doh: my DB column type is : "ntext" (to allow non english) i checked , i get right data on server , but wrong data would inputed to the DB !!! :confused: some code is like that :
string res = Request["amount"].ToString() + "," + Request["price"].ToString() + "," + Request["year"].ToString() + "," + Request["month"].ToString() + "," + Request["day"].ToString() + "," + Session["code"].ToString() + "," + Request["kind"].ToString() + "," + "1" + ",'" + Request["comment"].ToString()+ "'";
string str = "INSERT INTO invest (amount,totalprice,year,month,day,personID,typeID,canedit,cms)VALUES(" + res + ")";
SqlDataSource1.InsertCommand = str;
SqlDataSource1.Insert();
Response.Write("اطلاعات وارد شد");
Response.End(); -
filling a form on internet !hi guys , i`m new in C# and now have a problem :) i wanna open a web page , then get it`s form (my perpose page has 1 form) then fill the form , and click the button ! :-D the textbox of user name , is named : "e5ba6b5" see , i did this :
webBrowser1.Navigate("http://mysite.com"); HtmlElementCollection htm = webBrowser1.Document.Forms; HtmlElementCollection user = htm.GetElementsByName("e5ba6b5");
is it true ?! and how should i fill username and click the button ?! :wtf:
-
use javascript to change the color for mouseoverone other thing ;) if you found my postes helpful rate them !!! :-D
-
use javascript to change the color for mouseoverex me because it`s late night here , and i must go to bed ;) you can use something like this :
link button
and change yur javascript to this mode :
function LinkBtnMouseOver(e) {
document.getElementById(e).style.backgroundColor = 'Blue';
}function LinkBtnMouseOut(e) {
document.getElementById(e).style.backgroundColor = 'Green';
}or maybe it works directly on your asp page totaly like this new one : :sigh:
<asp:LinkButton ID="LinkButton1" runat="server" onmouseover="this.style.backgroundColor = 'Blue';" onmouseout="this.style.backgroundColor = 'Green';">link button
hope that it works :rolleyes:
-
use javascript to change the color for mouseover:laugh: yes i know it`s like this ;) i have visual studio enterprise , and it`s not supported very well here too !:mad: but i think that on express mode many of features are not working :suss: i think that just some stupid coder like me can Use these old "dhtml" commands ! but any how i love dhtml an i use it any where ;P
-
Menuhi you know , it`s not a real menu ! :cool: it`s just a tool to let you navigate between some pages !!! and its very easy to make that ! :) just make a master page like this with a table in left that has hyperlinkes to pages you want ;) then on masterpage`s page load function , set boarder for the cell that Client opens that that`s just it :-D
-
use javascript to change the color for mouseoveroops my text came half !!! :-D and add this one to java script:
NewID.style.backgroundColor = 'yourcolor';
-
use javascript to change the color for mouseoveryou know these codes should be rendered and then goes to the client , so if there was some thing unknown goes directly to client ;) so test this one :
link button
-
textbox eventhehehe i know :-D visual studio is stupid ;) javascript runs at client computers , so don`t worry :) just use it :cool:
-
textbox eventyes you are right !!! :laugh: but first we can let him to create his first javascript , then he can do any thing he wants ;)
-
textbox eventchange it to this one :
function Calculate()
{
document.getElementById('<%=txttotalprice.ClientID%>').value=
document.getElementById('<%=txtqty.ClientID%>').value *
document.getElementById('<%=txtproductprice.ClientID%>').value}
notice that javascript is Case Sencetive ! :-\
-
textbox eventoh i forgot to say something else ;) in your code that you made textboxes you must add this function like this :
-
textbox eventjavascript is the best way ;) if you have a masterpage , the way that blue boy said is better than mine :) code it like this in your .aspx page :
the code that blue boy said
-
Download Mp3it`s very easy friend ;) the work you must do is just to give the visitor the path of that file ! for example if you have button that visitor clicks that to download file you do this on button_click :
protected void btn1_Click(object sender, EventArgs e)
{
Response.Redirect("~musicsfolder//music.mp3");
} -
textbox eventhi you know , i think you`d better not do that like this !!! :-D because ontextchanged , sends the information to the server andyour page relodes and takes so much time ! it`s better to do this on client side with java script something like this :
var quantity = document.getElementById('txtqty').value;
var price = document.getElementById('txtproductprice').value;
document.getElementById('txttotalprice').value = quantity*price;:cool:
-
Pass textbox value to javascript functionthere is some way to get the text box value ;) one is to use .ClientId in your asp code like this :
document.getElementById(<% textbox1.ClientId %>).value
or if did`nt help you can do something else :) the ClientIds always the same as each other , so you can find the ID by view source of the page ! :laugh: for example it will be like this :document.getElemetById('ctl00_ContentPlaceHolder1_textBox1').value
:cool:
-
insert querythanks it helps alot ;)