Hi every one
i need the equivalent of vb in c#. the below code in vb i need in c# can any one know to write in c#
If TypeOf div Is HtmlGenericControl Then
CType(div, HtmlGenericControl).Style.Add("display", "none")
End If
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Roei BarPosted Aug 12, 2009, 7:36 AM
if(div is HtmlGenericControl )
((HtmlGenericControl )div).Style.Add("display", "none")
:-)
If you like this answer mark "Accepted Answer" ;-)
Master BillaPosted Aug 13, 2009, 8:01 AM
Just easy man
Then in code in Page load
Dim str as string = Request.Params("text-1").ToString()
C# code
string txtValue=Request.Params["text-1"].ToString();
Note: if you need conversion in future you can
http://www.developerfusion.com/tools/
Thank you
mohdazeemuddin ahmedPosted Aug 13, 2009, 6:50 AM
Then in code in Page load
Dim str as string = Request.Params("text-1").ToString()
i try like this
but it give me error that attribute can not be used as method can you give me some thing like this so that i can use the value and store in database
Niradhip ChakrabortyPosted Aug 13, 2009, 6:29 AM
mohdazeemuddin ahmedPosted Aug 13, 2009, 6:05 AM
i have one html textbox beside to that i have html button on that button i wrote the code for calender popup when user select the date from the calender popup then i can display the date on input but my question is how to read the html text box value in to the code behind i can not use runat ="server" in text box if i set this then script will not work so i need to read that from the text box can any one give the code