|
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.
|
|
|
|
|
Please tell me how to configure IIS and ASP.NET 2.0
to make urls like http://my_site.com/contacts instead of http://my_site.com/contacts.aspx
...
Of course, I can create Virtual Directory "contacts"
and set contacts.aspx as a default page, but I need a real solution.
Thanks in Advance
|
|
|
|
|
Hope this helps ...
You can configure the default page using the Internet Information Services MMC Snap-In.
Navigate to your default web site, right-click -> properties, select the Documents tab and edit as necessary. Before closing that window, select the ASP.Net tab and edit as necessary.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
hi
i hav made a project in asp.net 1.1 with vb.
i hav upload the project on client server its working fine with IE browser but when i open it into the mozilla browser.
its give me desiging error like header is not coming aur line is dissapper.
what i hav to do solve this problem
thanx.
|
|
|
|
|
If the layout looks different in IE 6 and Mozilla/FireFox/Netscape, it's almost always Mozilla/Firefox/Netscape that renders the code correctly.
IE 6 has a number of rendering bugs[^] that you have to avoid when you make designs that should work in IE 6 as well as other browsers.
---
b { font-weight: normal; }
|
|
|
|