|
hi all
how can i use multiple configuration file
that is one web config file and some other files with .config extention and also how to refer the keys
thanx in advance
coolsweety
|
|
|
|
|
|
|
hello sir,
thanx,
i used the same code from code project. if i gave the file name directly, then am getting one exception. and if i gave file name in with relative path it wont give any exception but didnt get any value. the code is shown below.
settings.config
appSettings
add key="Setting1" value="This is Setting 1 from ettings.config" add key="Setting2" value="This is Setting 2 from settings.config"
add key="ConnectionString" value="ConnectString from settings.confg"
appSettings
and web.config is
appSettings file="//Settings.config"
appSettings
and in cs file
string ConfigAttributeValue = ConfigurationManager.AppSettings["ConnectionString"];
Response.Write(ConfigAttributeValue);
exception i ma getting is
The root element must match the name of the section referencing the file, 'appSettings' (c:\inetpub\wwwroot\referexternalfiles\secondtestfileext\Settings.config
am using framework2 and vs2005
can u help me to get rid off this problem
coolsweety
-- modified at 0:37 Tuesday 25th April, 2006
|
|
|
|
|
thanx all, it is working.
the mistake wat i made is i had created the second config file with all attributes in configurationsettings, no need of using all setting use only appsettings in second config file
coolsweety
|
|
|
|
|
I am calling API of our own through dot net code to create a pdf file.After 1016 files created during report generation it's stop creating pdf files. I thing it is all because of Memory Leak. How do i force garbage colleter to release memory. I am using gc.collect() after that gc.gettotalmeory(true). How i reduces the cpu utilization it's show 100 %.
Can any one help me ?
Thanks in advance
Mahesh
|
|
|
|
|
I'm guessing the API to which you're referring is your own in-house COM object? If the memory leak is in the COM object, the .NET garbage collection won't help you, as it's not managed code.
|
|
|
|
|
How do i find out memory leak in my code. If it is in API how do i find it?
|
|
|
|
|
|
So I'm using asp.net 2.0 and I'm creating a table and I use the width property
<table width="100%">
But the compiler says I need to use a newer construct.
So where did the width go? Do i only use it in style now?
Whats up with that.
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
What version of (X)HTML are you using?
But yeah style="width: 100%" is nicer. And you should use layers for building the layout.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
will its 2005 so it xhtml 1.0
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
That really dosen't matter what VS you are using. You can use XHTML 1.1 with 2003 ...
But I must say that is strange becouse attribute width is perfectly valid...
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Goal - is to set focus to the next textbox in a datarepeater.
Problem - I need to perform a calculation server side after the 1st textbox is changed. I can do this but turning the autopostback = "true". However when I autopostback, I need to set the focus to the next control in the row I was working on. Anyone have any ideas?
I use VB
|
|
|
|
|
Hi Friends,
I have a query, how can we access the HTML control from ASP.NET code behind. "FindControl" is throwing error.
Thanks in advance
Sheel Gohe
|
|
|
|
|
Is the element marked with the attribute runat="server" ?
|
|
|
|
|
No mike its not marked with the attribute runat="server"? its purely a html control "
Any solutions....
Sheel Gohe
|
|
|
|
|
Please try the following code
Request.Form.GetValues("chkSelect")
|
|
|
|
|
If you want to manipulate a server control or HTML element through server-side code, you must mark the element with the attribute runat="server" . In your case, you could certainly have the following:
<input type="checkbox" id="chkSelect" runat="server"/> Server-side then, the chkSelect object would be identified as the type System.Web.UI.HtmlControls.HtmlInputCheckBox , and you could inspect or manipulate it's properties (lookup HtmlInputCheckBox on MSDN for a reference).
You could certainly use a <asp:Checkbox id="chkSelect" runat="server"/> control instead. Any reason you're not?
|
|
|
|
|
Read this please.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I want to create a page in which I ask the user to upload files. I want to upload those files into some directory which is to be created dynamically. How can I open File Dialog on a page and then create a directory where I can save the file?
Thanks,
Sandy
|
|
|
|
|
u can use input file control or asp:FileUpload control to save in to a directory
coolsweety
|
|
|
|
|
but sweety I have checked, there is no asp:FileUpload control. The intellisense of Visual studio showed no such tag.
Thanks,
Sandy
|
|
|
|
|
It's a plain html control.
|
|
|
|
|
Hi, sorry i know this isnt a java forum but i do know that a few of you have some good java / .net knowledge.
I have the following code to create a pop-up window:
string popupScript = "<script language='javascript'>" +<br />
"window.open('"+strUrl+"', 'CustomPopUp', " +<br />
"',, menubar=no, resizable=yes')" +<br />
"</script>";<br />
<br />
Page.RegisterStartupScript("PopupScript", popupScript);
How do i add a scrollbar to the window?
Thanks!
munklefish
|
|
|
|