I have a problem with my code. Below is simple example, without a lot of unnecessary html tags. Only important things, to show up the problem.
When I enter page, I get that error:
Error creating usercontrol (usercontrols/own/profilEdit.ascx)
c:\inetpub\wwwroot\umbraco\usercontrols\own\profilEdit.ascx(705): error CS0103: The name 'satbCountry' does not exist in the current context
This error is connected with <script> code (anyway this js code is correct, on another subpage works perfectly, but here when this code is on page, it crushes). Why I get this message?
Here code:
<asp:View ID="vSpecialist" runat="server"> <asp:UpdatePanel ID="UpdatePanel3" runat="server"> <ContentTemplate> (..) <asp:ListView runat="server" ID="lvAddressess" ItemPlaceholderID="phAddress" OnItemDataBound="lvAddressess_ItemDataBound"> <LayoutTemplate> <asp:PlaceHolder ID="phAddress" runat="server"></asp:PlaceHolder> </LayoutTemplate> <ItemTemplate> <script> var input = document.getElementById('<%=satbCountry.ClientID %>'); var options = { types: ['(regions)'] }; var autocomplete = new google.maps.places.Autocomplete(input, options); </script> <asp:TextBox CssClass="textbox" type="text" runat="server" ID="satbCountry"></asp:TextBox> </ItemTemplate> </asp:ListView> </ContentTemplate> </asp:UpdatePanel> </asp:View>