Got problem with Login View Control and Login Control

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2006
Posts: 15
Reputation: NguyenThai is an unknown quantity at this point 
Solved Threads: 0
NguyenThai NguyenThai is offline Offline
Newbie Poster

Got problem with Login View Control and Login Control

 
0
  #1
Sep 3rd, 2009
Hello everyone. I get problem with the login control and login view during working with my ASP.Net project. I'm using VS 2008, C# language, AJAX Control Toolkit. I built the master page, and I want the login control is always available everywhere in my website, but I cannot find how to make the login view and login control fit inside a table. My website has 3 part, header, main content, and footer. In main content, I'm create a table with 2 columns, the 2nd column I put the ContentPlaceHolder, the 1st I want to put the login view or login control on the top, so I divide again and I have 2 row in the first. But when I add the control, it expand full of the first column. I try to resize but the table will resize also. So anyone who know how to do that. I'm very appreciate that.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 3
Reputation: bsg is an unknown quantity at this point 
Solved Threads: 0
bsg bsg is offline Offline
Newbie Poster

Re: Got problem with Login View Control and Login Control

 
0
  #2
Sep 6th, 2009
Hi,

I have a very similar problem. I have a login control inside a loginview on my masterpage inside a table cell. The cell before it contains a header image, and they are supposed to be very close together. It looks good in Visual Web Developer, but in a browser, there is a large space between my login control and the rest of the header (both are sized to be much smaller, but when I use developer tools to look at each element, the login is further over because the header is so large.) I am a novice at using CSS and tables and have been getting more and more frustrated. Please help me. I am including my markup below. Thank you very much.

-bsg


  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head runat="server">
  3. <title></title>
  4.  
  5.  
  6. <asp:ContentPlaceHolder ID= "head" runat ="server">
  7.  
  8. </asp:ContentPlaceHolder>
  9. <style type="text/css">
  10.  
  11. .style2
  12. {
  13. width: 810px;
  14. height: 60px;
  15. }
  16. .style3
  17. {
  18. height: 128px;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <form id="form1" runat="server">
  24. <asp:ScriptManager ID="ScriptManager1" runat="server">
  25. </asp:ScriptManager>
  26. <center><asp:Label ID="notifyRedirect" runat="server" Text="" Font-Size ="Medium" ForeColor="Red" Font-names="Trebuchet MS" ></asp:Label></center>
  27. <table >
  28. <tr >
  29. <td colspan = "3" >
  30. <asp:Menu ID="Menu2" runat="server" DataSourceID="SiteMapDataSource1">
  31. </asp:Menu>
  32. <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
  33. </td>
  34.  
  35. </tr>
  36.  
  37. <tr>
  38. <td id = "topBanner" class="style2">
  39. <asp:Image ID="Image2" runat="server" ImageUrl="~/App_Themes/Events/Images/top banner.JPG"/>
  40.  
  41.  
  42. </td>
  43.  
  44. <td rowspan="2" class="style3" valign="top" align="left" >
  45.  
  46. <asp:LoginView ID="LoginView1" runat="server">
  47. <LoggedInTemplate>
  48.  
  49. </LoggedInTemplate>
  50. <AnonymousTemplate>
  51. <asp:Login ID="Login1" runat="server" BackColor="#00FFCC"
  52. CreateUserText="Not a member? Register now!" CreateUserUrl="SignUp.aspx"
  53. DestinationPageUrl="~/Default.aspx" FailureText="" Height="90px"
  54. TitleText="Event Planners &lt;br /&gt; Check when other events &lt;br /&gt; are planned for - avoid conflicts!"
  55. Width="267px" VisibleWhenLoggedIn="False" onloggedin="Login1_LoggedIn" >
  56. </asp:Login>
  57.  
  58.  
  59. </AnonymousTemplate>
  60. </asp:LoginView>
  61. <asp:Label ID="LoginErrorDetails" runat="server" Font-Names="Trebuchet MS"
  62. Font-Size="Small" ForeColor="Red"></asp:Label>
  63. <br />
  64.  
  65.  
  66. </td>
  67. </tr>
  68. <tr >
  69. <td>
  70. <asp:ContentPlaceHolder runat="server" ID="ContentPlaceHolder1">
  71.  
  72.  
  73. </asp:ContentPlaceHolder>
  74.  
  75. </td>
  76.  
  77. </tr>
  78.  
  79. </table>
  80. </form>
  81. </body>
  82. </html>


Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 15
Reputation: NguyenThai is an unknown quantity at this point 
Solved Threads: 0
NguyenThai NguyenThai is offline Offline
Newbie Poster

Re: Got problem with Login View Control and Login Control

 
0
  #3
Sep 7th, 2009
Hi! At this point, I might not get the perfect solution for that but I can tell you something that I figured out with this. I had to create and delete several time before I can get it. Ok now go to the main discussion. The Login View probably doesn't have ability to move with absolute position so you cannot move it. The Login Control has this, but if you put inside the login view, whenever you move the login view will be not perfect. And like before, I put it in the table, but when I moved it, the table or any header or div tag will be moved. So the solution for that is using div tag, not the table. You can look up why using div not table. One more thing that you need to have a good design of CSS Template, I come with the template on free, it has a div side bar so I can put my login to this side bar. Also, you don't need to but the script manager. Login control is a Ajax-Enabled control, which means you already got Ajax. The master page look like doesn't need to have a Ajax technique but the delivery page might need.
I hope this will help you get out some trouble.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 775 | Replies: 2
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC