0

I have a code in my master page that I used placeholder to show and hide 2 different parts.It is completely works fine in all the Browsers, but it is not working on Iphone Even it is working on Android. this is my code:

   <div class="actions"> 
                <asp:PlaceHolder ID="phLogout" runat="server">

                    <input TYPE="button" VALUE="Log Out" class="Button Orange" onclick="window.location.href = 'Logout.aspx'"> 

                </asp:PlaceHolder>
                <asp:PlaceHolder ID="phLogin" runat="server">
                    <p class="Title">Current users sign in:</p>

                    <asp:TextBox runat="server" ID="username" holder="Username"></asp:TextBox>
                    <asp:TextBox runat="server" ID="password" holder="Password" TextMode="Password"></asp:TextBox>

                    <asp:Button ID="Button1" runat="server" Text="Log In" class="Button Orange" OnClick="btn_login_Click"   ></asp:Button>
                    <p class="Forgot"><a href="ForgotPassword.aspx">Forgot password?</a></p>
                </asp:PlaceHolder>
            </div>

I just found out that this part is not showing in the iphone with all the content inside the . what I can use instead of tag? I tried but all the styling gets off. Is the only tag replacing this so I may work more on style sheet or you are suggesting something else? Or even if the reason for not showing is the ?

nikta
  • 79
  • 3
  • 14
  • What are you actually expecting? `asp:Placeholder` is a server side tag that must be placed inside a server side .aspx page that in turn is processed by the web server and renders actual html to display on browser. So if your page is not hosted in a web server it would never work! – Ayan Sengupta Feb 20 '14 at 23:14
  • it is working fine in all the browsers! as I mentioned it is not working only in iphone even it is working on Android. – nikta Feb 20 '14 at 23:18
  • How are you calling the page in iOS? Please share some code. – Ayan Sengupta Feb 20 '14 at 23:19
  • Just with going to my website URL with iphone. – nikta Feb 20 '14 at 23:26
  • I'm not sure what's happening underneath but if you have a mac and Xcode, you can open the page in ios simulator from Xcode. Then you can open up Safari->turn on its Developer tab from Preferences->Advanced and finally you can hook your iOS browser page with Safari developer tools to see what HTML is actually being rendered. – Ayan Sengupta Feb 21 '14 at 00:29

1 Answers1

0

I believe the "holder" attribute in your textboxes should be "placeholder" instead.

Tyler Day
  • 1,690
  • 12
  • 12
  • Holder is completly different than placeholder. Holder shows the text inside the textbox. It is not related to placeholder at all. – nikta Feb 20 '14 at 23:35
  • 1
    Yes I know that. Whatever issue you are having is not related to the tags. Those are resolved on the server and have no html equivalent. "holder" is not a valid attribute for the textbox. "placeholder" is a valid attribute and what you want to use. This is most likely the cause of any weirdness thats happening. http://stackoverflow.com/questions/15823983/how-do-i-put-hint-in-a-asptextbox – Tyler Day Feb 20 '14 at 23:40