|
I'm trying very hard to help you, do you mind telling me what you're trying to achieve by browsing for a folder on your site ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Are you talking about fileupload control..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
<%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="register.aspx.cs" Inherits="register" Title="Untitled Page" %>
<script type="text/javascript" language="javascript">
function ActivateStep()
{
ListBox1.DataSource = Roles.GetAllRoles();
ListBox1.DataBind();
}
function DeactivateStep()
{
Roles.AddUsersToRole(User.Identity.Name, ListBox1.SelectedValue);
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table class="style1">
<tr>
<td>
</td>
</tr>
<tr>
<td>
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" BackColor="#F7F6F3"
BorderColor="#E6E2D8" BorderStyle="Solid" BorderWidth="1px"
Font-Names="Verdana" Font-Size="0.8em" ActiveStepIndex="2">
<SideBarStyle BackColor="#5D7B9D" BorderWidth="0px" Font-Size="0.9em"
VerticalAlign="Top" />
<SideBarButtonStyle BorderWidth="0px" Font-Names="Verdana" ForeColor="White" />
<ContinueButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC"
BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"
ForeColor="#284775" />
<NavigationButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC"
BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"
ForeColor="#284775" />
<HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True"
Font-Size="0.9em" ForeColor="White" HorizontalAlign="Center" />
<CreateUserButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC"
BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"
ForeColor="#284775" />
<TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<StepStyle BorderWidth="0px" />
<WizardSteps>
<asp:CreateUserWizardStep runat="server" >
<ContentTemplate>
<table border="0" style="font-family:Verdana;font-size:100%;">
<tr>
<td align="center" colspan="2"
style="color:White;background-color:#5D7B9D;font-weight:bold;">
Sign Up for Your New Account</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User
Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="UserName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
ControlToValidate="UserName" ErrorMessage="User Name is required."
ToolTip="User Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server"
ControlToValidate="Password" ErrorMessage="Password is required."
ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="ConfirmPasswordLabel" runat="server"
AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
</td>
<td>
<asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server"
ControlToValidate="ConfirmPassword"
ErrorMessage="Confirm Password is required."
ToolTip="Confirm Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
</td>
<td>
<asp:TextBox ID="Email" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="EmailRequired" runat="server"
ControlToValidate="Email" ErrorMessage="E-mail is required."
ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question">Security
Question:</asp:Label>
</td>
<td>
<asp:TextBox ID="Question" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="QuestionRequired" runat="server"
ControlToValidate="Question" ErrorMessage="Security question is required."
ToolTip="Security question is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Security
Answer:</asp:Label>
</td>
<td>
<asp:TextBox ID="Answer" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="AnswerRequired" runat="server"
ControlToValidate="Answer" ErrorMessage="Security answer is required."
ToolTip="Security answer is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:CompareValidator ID="PasswordCompare" runat="server"
ControlToCompare="Password" ControlToValidate="ConfirmPassword"
Display="Dynamic"
ErrorMessage="The Password and Confirmation Password must match."
ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color:Red;">
<asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
</table>
</ContentTemplate>
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep runat="server" />
<asp:WizardStep runat="server" Title="choose roles" OnActivate="ActivateStep()" OnDeactivate="DeactivateStep()">
Select a role:<br />
<asp:ListBox ID="ListBox1" runat="server">
</asp:ListBox>
</asp:WizardStep>
</WizardSteps>
</asp:CreateUserWizard>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</asp:Content>
error:only content controls are allowed directly in a content page that contains content control.
|
|
|
|
|
mylogics wrote: error:only content controls are allowed directly in a content page that contains content control.
The error means what it says. Your code is too hard to read for me to spend a half hour figuring out where it's wrong.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
it is giving error at the script starting tag:
|
|
|
|
|
Then why didn't you say so ? I see two content controls, is that right ? Where is your form element, etc ? I think the problem is that you've removed the core elements of an ASP.NET page.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
it is inheriting the master page.where shud i write the script...
|
|
|
|
|
Good point. Your problem is the other thing I told you. Did you read it ?
You have two content controls nested within each other. You can't do that. That's what the error message is telling you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thnks i got the solution....
|
|
|
|
|
If You don't have the time of aligning your html .
How Would you think tht.We will Align the Html and try to answer your question.
First align your Html and ask the question..!Its very difficult to understand..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
You have added more than one asp:content .
In that case you need to have more than one contentplaceholder in the masterpage to match them.
|
|
|
|
|
I want to make user registration through role and membership with customized fields like: i want to include columns like:-country,phone etc........how to achieve it.....do i need to use role and membership and make separate table for login and all thing.........and one more thing whenever user registers he should directly added to a default role..............plz guide me a bit
|
|
|
|
|
If I were you, I'd just write my own code from scratch. I don't know if there's support for this sort of extension in the built in stuff, but it's so simple to write, you're better off having full control over it IMO.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: I'd just write my own code from scratch
Yes ... Me too.
|
|
|
|
|
|
Christian is right. I would do similar to him. I would write my own code for Roles and Membership.
If you still need to know about .NET role - Memebership
Check this.[^]
|
|
|
|
|
Abhishek Sur wrote: I would write my own code for Roles and Membership.
What do You Mean by that..!
1)You will Create new tables without the help of asp.net forms authentication...!
Can you please be more clear..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Exactly.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yes. I would do just that. I would create my own HttpModule to manage Roles.
|
|
|
|
|
Dear all,
Am loging in to my application and i didnt make any transaction, after sesstion timeout if am clicking any form that time loginpage will come, so in this regards i want login page autometically after sesstion timeout.give me solution
|
|
|
|
|
Your question makes no sense, you seem to say that what is happening, is what you want to happen. You also don't tell us what you mean by 'transaction', how you handle login, etc.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Have you try to understand the question, just said that it make no sense.Please dont be in hurry to answer any question first try to understand that.
|
|
|
|
|
Am loging in to my application and i didnt make any transaction,
What does he mean by 'transaction' ? How is this relevant ? How does his system allow logging in ? If we don't know what the login code is, how can we comment on it ?
after sesstion timeout if am clicking any form that time loginpage will come
When his session times out if he tries to do anything, then he gets a login page
so in this regards i want login page autometically after sesstion timeout.give me solution
Oh - I see now. OK, fair enough. It's hardly clear tho.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
OK, I managed to decipher this, I THINK.
To get the login page to show automatically, you need a javascript timer which fires after the same time as a timeout, and refreshes the page. Then the login page will show. This is rarely what users want, but it will work.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
This is exactly what I did in my app and it works like a breeze. And to make the code generic, use a base Page class from which all your aspx code-behind classes derive. In the OnLoad event, use RegisterStartupScript to inject the javascript that refreshes the page. Use Session.Timeout property to determine the timeout in seconds.
protected override void OnLoad(EventArgs e) {
this.RegsiterStartupScript ("CheckTimeOut",
"<script language=\"Javascript\">"
+ "window.setTimeout(\"document.forms[0].submit();\","
+ Session.Timeout * 1000 + ");</script>"
}
|
|
|
|