|
Hello!
I have a big problem. Since three days I am searching for an answer without finding any functional hint.
I created a website with Visual Studio 2005 Professional. On the page I used the Login Control from Microsoft.
So far everything works fine on my Computer.
After uploading to my Windows 2003 Standard Server I only get the following Message:
An attempt to attach an auto-named database for file
c:\inetpub\wwwroot\Demo\App_Data\aspnetdb.mdf failed. A database with the same name exists, or
specified file cannot be opened, or it is located on UNC share.
I even installed Visual Web Developer Express Edition on my Sever and it works in the Debug Modus but not with my IIS 5.2.
Please tell me what I am doing wrong.
Thank you very much!!!
What I have done so far:
1) I installed SQL Server Express Edition on my Server.
2) I created a virtual directory.
3) I uploaded my complete website, including the App_Data directory.
4) A lot of things that did not help any further.
|
|
|
|
|
|
Ok I have set up a checklistbox and then an arrow button to move each selection over to the next listbox when asked - What I want is to allow the user to change the order of the displayed list. I need to reindex the second list box inthe order that they are sent over by the arrow button but can't figure out the syntax:
I have this:
lbOutcomes1.Items.Clear()
Dim chkListOutcomesItem As ListItem
Dim x As Integer = 1
For Each chkListOutcomesItem In chkListOutcomes.Items
If chkListOutcomesItem.Selected = True Then
Me.lbOutcomes1.Items.Add(chkListOutcomesItem.Text)
'Me.lbOutcomes1.SelectedIndex = x
End If
x = x + 1
Next
But it chokes on the commented out line - how do I accomplish what I am trying to do - I want the user to arrange the order of this sentences - this order will be saved back into my database and the table headers that will generated will appear int he order they selected. I need to figure this out ASAP as they want to roll out this sytem and I need to be able to allow column selection and moving them around.
Thx, Tammy
|
|
|
|
|
Hi, I use VS2003 asp.net 1.1 C#
I am working on bilingual website and I would like to use by exemple 2 files like career_fr.txt and career_en.txt that I will include in my html code based on the language. In html we use to write and works fine but when i want to switch the language it comes a problem for me.
I know that we can use .resx (ressource file) and that's what I do for short sentence or label. By using files.txt or files.inc that I can access based on language will be easier to edit for the non programmer.
Any suggestion will be wellcome.
Thanks for help,
Davy
|
|
|
|
|
IMHO, there are a couple of options that you may consider to include a text file in the ASP.NET:
+ Place a container such as Label, Literal ... controls in the web page, and dynamically load the text file based on the selected language and assign the content to the container.
+ Create a web user control and include it it the web page instead of the #include syntax.
|
|
|
|
|
Hi minhpc_bk,
Thanks for your suggestion.
Based on it I Resolved my problem with some little variances. I put a label on the web page and in C# side I created an object streamReader, I read my txt file and I assigned it to my label. In the C# code I switched between french and english based on what the user choose.
Thanks again
Davy
|
|
|
|
|
Hello there,
I have built as .aspx page. I have a situation to create 4 panels in
a . Based on the selection of a drop down I need to display
the corresponding panel in that table cell. Every thing works fine but
I see a lot of space in the table cell that was occupied by the other
panels though they are being hidden.
Can any one help me how to remove the space ? I dont' know how to use
style sheets or even do not if the the DIV functions works and how to
use it.
Here is a sample table code snippet with panels inside the table cells
for you to simple put some code to show me.
drop down selection |
<asp:panel1>
<asp:panel2>
<asp:panel3>
<asp:panel4>
|
Any inputs are greatly appreciated.
Thanks
-L
|
|
|
|
|
Learn how to use style sheets and divs. You already knew the answer!
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
I need a starting point. I appreciate your encouragement and thats how we learn.
Thanks
-L
|
|
|
|
|
Hi,
Can any1 plz tell me how to change the title of an aspx page at runtime using ASP.NET.I dont want to hardcore the title but depending upon the login id, i want the title of the page to be changed at runtime.
Urgent help is needed.
Thanks,
Riz
|
|
|
|
|
Didn't get an immediate answer to your previous question?
Changing the title and reposting I'm sure will definately get a better response.
only two letters away from being an asset
|
|
|
|
|
this.Page.Title = "IntelliSense FTW!"
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Hi,
Can any1 plz tell me how to change the title of an aspx page at runtime using ASP.NET.I dont want to hardcore the title but depending upon the login id, i want the title of the page to be changed at runtime.
Urgent help is needed.
Thanks,
Riz
|
|
|
|
|
maybe you could remove the title header.
something like
Request.RemoveHeader()
then
Request.AddHeader()
in 2.0 this is easily accessed on the Page so this is just a guess
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Hi all,
I hope you can help me with the following problem...
A custom control I've created will not perform 2-way databinding on one of its properties in a FormView control - when inserting (or editing), the control's property value is not retrieved but I know the property has a value and is stored in the viewstate.
The custom control is a composite control (Inherited from System.Web.UI.WebControls.CompositeControl) which is used in the Edit and Insert ItemTemplates of a FormView control.
I've databound a property (DataValue) of the control like this:
<cc1:custCtrlTest1 id="SiteId" runat="server" DataValue='<%# Bind("siteId") %>' ></cc1:custCtrlTest1>
The property declaration in the custom control is like this:
< _
Bindable(True), _
Category("Appearance"), _
Description("Value to display in the valueTextbox.") _
> _
Public Property DataValue() As String
Get
EnsureChildControls()
Return valueTextBox.Value
End Get
Set(ByVal value As String)
EnsureChildControls()
valueTextBox.Value = value
End Set
End Property
During the iteminserted or iteminserting events e.Values.Item("siteId") is empty.
Strangely, in the ItemTemplate the control works fine, a value is databound and given to the DataValue property, it's only failing when binding in the other direction.
Can anyone help?
Thanks,
M@
|
|
|
|
|
You may try with Bindable(True, BindingDirection.TwoWay)
|
|
|
|
|
Thanks for the suggestion, I've made this change
minhpc_bk wrote: Bindable(True, BindingDirection.TwoWay)
to the bindable property attribute and the bindable class attribute in my custom control - but unfortunately it's not done the trick.
Any other ideas would be greatly appreciated!
Thanks,
M@
|
|
|
|
|
Perhaps the problem might be somewhere else either in the control or in the way you use the control in the testing web page. Below is a quick example:
[DefaultProperty("DataValue")]
[ToolboxData("<{0}:CustCtrlTest runat=server></{0}:CustCtrlTest>")]
public class CustCtrlTest : CompositeControl
{
TextBox valueTextBox;
[Bindable(true)]
[Category("Appearance")]
[DefaultValue("")]
[Localizable(true)]
public string DataValue
{
get
{
EnsureChildControls();
return valueTextBox.Text;
}
set
{
EnsureChildControls();
valueTextBox.Text = value;
}
}
protected override void CreateChildControls()
{
Controls.Clear();
CreateControlHierarchy();
ClearChildViewState();
}
protected virtual void CreateControlHierarchy()
{
valueTextBox = new TextBox();
valueTextBox.ID = "valueTextBox";
Controls.Add(valueTextBox);
}
}
|
|
|
|
|
I think the problem must have been on my test web page as you suggested.
I've just re-created the test page from scratch and now it's working fine! Although I can't see any code differences from the last time I created the page, could it have been the order in which I built the page in Visual Studio maybe??
Anyway, along with the bindable changes to the control and a page rebuild all is now well!
Thanks for the help!
M@
|
|
|
|
|
Hi all,
Greetings.I have a doubt.in my application i need to add the intervel time for working hours calculation.
for example
the work ends at 9 pm.if i add a new work it has to be added with time 9 am.so the 12 hours in between the work has to be add.Can any one help me to solve this problem.
thanks in advance
Babu
|
|
|
|
|
Dim endDate as DateTime
Dim newStartDate as DateTime
'Set your end date and then:
newStartDate = endDate.AddHours(12)
|
|
|
|
|
actually it has to be added for everyday work setting.how it will be possible.can you tell me clearly.
Babu
|
|
|
|
|
ChennaiBabu wrote: can you tell me clearly
Only if you explain clearly want you need.
only two letters away from being an asset
|
|
|
|
|
I added a Menu control to my site and I set the Orientation to Horizonal. However, the child item still disply as Vertical. How do I get the child items to also display Horizontal under the root items?
|
|
|
|
|
This is the default behavior of the control and AFAIK many people have this problem. IMHO, you may want to customise the control or use a third party menu control.
|
|
|
|