Value Betweeen ascx and aspx!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a usercontrol with a textbox "YearOfRefTextBox" ..now after
registering the usercontrol in aspx,i need to get the value of textbox in
aspx thru javascript..

i did like this..but getting null value...

<%@ Register TagPrefix="Usr" TagName="ISANCommonCtrls" Src="~/User
Controls/ISANCommonCtrls.ascx"%>

<Usr:ISANCommonCtrls ID="UsrCtrlForISANID" runat="server" />


and
alert(document.forms[0]['UsrCtrlForISANID:YearOfRefTextBox'].item)


pls tell me,what i am doing wrong..

Thnks
Ann
 
I would add a property on the user ctl to what you're trying to access,
i.e. TextBox.text, then in js call the instance->property
<%= UserCtlInstance.Property %>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top