|
how to get folder select dialog box .
|
|
|
|
|
Why would you want to select a folder in a website ? What would you do with the folder path ?
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 want it on my site.
i had used FolderBrowserDialog . But it gives error like
System.Windows.Forms.FolderBrowserDialog m_obBrowser = new System.Windows.Forms.FolderBrowserDialog();
m_obBrowser.ShowDialog();
urrent thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process.
|
|
|
|
|
bhavna4321 wrote: yes i want it on my site.
But, why ?
bhavna4321 wrote: System.Windows.Forms.FolderBrowserDialog m_obBrowser
What does this tell 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.
|
|
|
|
|
Hello ? FWIW, it's my bedtime and I'm staying up to try to help you here. Why do you want to browse for a folder in your ASP.NET app ?
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: it's my bedtime
9PM is too early to sleep
Best wishes,
Navaneeth
|
|
|
|
|
Not for me, I'm an old man. Plus, we had a late night last night and an early start today.
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.
|
|
|
|
|
if not now please help me out early next morning so that i can solve it at today night at least.
i am trying out in javascripting too but in vain
function function1() {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var parentFolder = fso.GetFolder('c:\\');
}
|
|
|
|
|
bhavna4321 wrote: function function1() {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var parentFolder = fso.GetFolder('c:\\');
}
This will only work in IE, do you not want to support Firefox, etc ? There is no folder browser dialog offered by HTML, which is obviously what you're working with here. You could write an ActiveX plugin ( which will also only work in IE ), but, I ask again, why on earth would you want to browse for a folder anyhow ? Of what use could it possibly be ?
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.
|
|
|
|
|
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.[^]
|
|
|
|