Click here to Skip to main content
15,886,919 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
Palavesam Pattan14-Nov-11 17:59
professionalPalavesam Pattan14-Nov-11 17:59 
GeneralRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
Richard MacCutchan14-Nov-11 21:16
mveRichard MacCutchan14-Nov-11 21:16 
GeneralRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
Palavesam Pattan15-Nov-11 1:33
professionalPalavesam Pattan15-Nov-11 1:33 
GeneralRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
Richard MacCutchan15-Nov-11 4:51
mveRichard MacCutchan15-Nov-11 4:51 
QuestionRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
Palavesam Pattan15-Nov-11 17:55
professionalPalavesam Pattan15-Nov-11 17:55 
AnswerRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
Richard MacCutchan15-Nov-11 21:38
mveRichard MacCutchan15-Nov-11 21:38 
GeneralRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
Palavesam Pattan15-Nov-11 21:53
professionalPalavesam Pattan15-Nov-11 21:53 
AnswerRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
jkirkerx5-Nov-11 17:28
professionaljkirkerx5-Nov-11 17:28 
I've never tried to put a findcontrol in a findcontrol, but in vb the + signs are still & ampersands. However, since the code in the () is javascript, the plus + signs should work, if you require a direct print of the findcontrol.

You may not have imports system.web

or you need to prefix the control
System.Web.UI.DropDownList
or something like that, I don't remember where the dropdownlist resides at.

CType(gvw.FindControl("FTddlCity"), DropDownList).Attributes.Add("onchange", "javascript:city_Visibility('" + CType(gvw.FindControl("FTddlCity"), DropDownList).ClientID + "','" + CType(gvw.FindControl("FTtxtCityName"), TextBox).ClientID + "');")


Hmm, thinking out loud.

Findcontrol is server side processed, before the html is rendered and sent back to the client. The findcontrol in the Javascript is just an ID reference to the DropDown, so the Dropdown can be called in the DOM. Your using a server side name called FTddlCity to find it on the server side, when you can just let the client side do it's thing, using the client side id.

in Jquery, you can find the id asp.net server has assigned by calling
$('[id*="_FTddlCity"]').css('background-color', txtFocus).fadeOut("normal");



If you just assign a unique ID to the Dropdown, you can just call the ID in the Javascript. This will filter over the prefix the server will assign to the ID or the control. If you want to hard code an ID, it's attributes.add("id", "FTddlCity")
Questiongridview control Pin
dcof2-Nov-11 8:53
dcof2-Nov-11 8:53 
AnswerRe: gridview control Pin
Anurag Gandhi3-Nov-11 0:30
professionalAnurag Gandhi3-Nov-11 0:30 
QuestionWord Automation Pin
padmanabhan N1-Nov-11 19:56
padmanabhan N1-Nov-11 19:56 
Questionfpassing asp.net field Pin
dcof1-Nov-11 12:36
dcof1-Nov-11 12:36 
AnswerRe: fpassing asp.net field Pin
Not Active1-Nov-11 13:51
mentorNot Active1-Nov-11 13:51 
GeneralRe: fpassing asp.net field Pin
dcof1-Nov-11 17:47
dcof1-Nov-11 17:47 
GeneralRe: fpassing asp.net field Pin
Brij1-Nov-11 21:48
mentorBrij1-Nov-11 21:48 
GeneralRe: fpassing asp.net field Pin
Not Active2-Nov-11 2:17
mentorNot Active2-Nov-11 2:17 
Questiontable control asp.net 2010 Pin
classy_dog1-Nov-11 9:27
classy_dog1-Nov-11 9:27 
AnswerRe: table control asp.net 2010 Pin
Dennis E White1-Nov-11 12:01
professionalDennis E White1-Nov-11 12:01 
QuestionAsync Report MVC3 Pin
eddieangel1-Nov-11 7:00
eddieangel1-Nov-11 7:00 
QuestionNeeded Code of changing dropdownlist Pin
Raghu1630-Oct-11 19:28
Raghu1630-Oct-11 19:28 
AnswerRe: Needed Code of changing dropdownlist Pin
Anurag Gandhi30-Oct-11 22:47
professionalAnurag Gandhi30-Oct-11 22:47 
QuestionCan't see my site's flash in an iframe tag Pin
benams30-Oct-11 6:37
benams30-Oct-11 6:37 
QuestionSubmitChanges is not working Pin
classy_dog29-Oct-11 8:17
classy_dog29-Oct-11 8:17 
AnswerRe: SubmitChanges is not working Pin
Richard MacCutchan29-Oct-11 22:38
mveRichard MacCutchan29-Oct-11 22:38 
GeneralRe: SubmitChanges is not working Pin
classy_dog30-Oct-11 11:06
classy_dog30-Oct-11 11:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.