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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Roei BarRank #1,271 · 1.4K reputationPosted Aug 12, 2009, 3:36 AM EDT
if(div is HtmlGenericControl )
((HtmlGenericControl )div).Style.Add("display", "none")
:-)
If you like this answer mark "Accepted Answer" ;-)
mohdazeemuddin ahmed125 reputationPosted Aug 13, 2009, 2:05 AM EDT
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
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Aug 13, 2009, 2:29 AM EDT
mohdazeemuddin ahmed125 reputationPosted Aug 13, 2009, 2:50 AM EDT
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
Master BillaRank #2,229 · 630 reputationPosted Aug 13, 2009, 4:01 AM EDT
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