|
Tanx for ur reply...I tried it already but when i give AutoPostBack="True" it's not working....Actually i want to put meter cube per hour(m ³/hr) in session...Any Suggestions will be helpful...
Thanks in Advance...
|
|
|
|
|
Sorry Kasi
I have given as much information as I can on this one.
It does work on a postback for me and my colleagues so I am at a loss as to what else is happening with your code.
I can only suggest you try Debugging and Trace to see the errors.
Hydraman says "Make mine a water"
|
|
|
|
|
Hose him down Hydraman.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello All...
i have two tables where i have 3 div in 1 one table and 3 Divs in other table.
i want that i can drag any DIV of 1st tables DIV to 2nd TABLES Div and can paste on it..
i went to several solutions but they are providing solutions for HardCord Named DIVS not for Runtime Created DIVs.
pls help me....
Jay R.Bhagatwala
|
|
|
|
|
I suggest you to check-out the widget plug-in http://wordpress.org/extend/plugins/widgets/ for Wordpress blog.. you can find the JS code from PHP file..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
hi frns
i want to copy a file from my disk and rename it with other name and save to my disk i used this snippet its working fine. But, for this to happen i have to write the fullname of the file with extension in the textboxes i provided
but i want to ignore the extension can anybody send me some code to complete this task
FileInfo thefile = new FileInfo(MapPath("RtfFilesPath") + "\\" + txtOriginalName.Text);
if (thefile.Exists)
{
File.Copy(MapPath("RtfFilesPath") + "\\" + txtOriginalName.Text, MapPath("RtfFilesPath") + "\\" + txtFilename.Text);
}
regards
-- modified at 6:31 Monday 12th November, 2007
|
|
|
|
|
Append the file extension to the text box value.
MapPath("RtfFilesPath") + "\\" + txtFilename.Text + FileInfo.Extension
Regards - J O H N -
|
|
|
|
|
CS0120: An object reference is required for the nonstatic field, method, or property 'System.IO.FileSystemInfo.Extension.get'
Line 34: try
Line 35: {
Line 36: FileInfo thefile = new FileInfo(MapPath("RtfFilesPath") + "\\voice\\" + txtOriginalName.Text +FileInfo.Extension);
Line 37: if (thefile.Exists)
Line 38: {
iam getting this error it is not accepting extension key word
|
|
|
|
|
I guess you are trying to access the Extension property for the source file Name of the FileInfo Object before loading the file. the below given code works fine in my system without giving the extension of the new name. When you give the original file name, you need to specify the extension at the input stage. If the file-type is fixed then you hard-code it or pass the extension as a parameter.
FileInfo TheFile =
new FileInfo(Server.MapPath(".") + "\\" + txtOldFile.Text);
if (TheFile.Exists) {
File.Copy(MapPath(".") + "\\" + txtOldFile.Text,
MapPath(".") + "\\" + txtNewFile.Text + TheFile.Extension);
}
else {
throw new FileNotFoundException();
}
Regards - J O H N -
|
|
|
|
|
thanks for u r reply sir its working but some times the extensions will be changing its a rare case
anyway thanks for ur replies
regards
sunilwise
|
|
|
|
|
You're Welcome.
Regards - J O H N -
|
|
|
|
|
Asalam-O-Alikum!
how to add and modify any connectionstring in web.config
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
|
thx john
but i want to add aur modify connection string at runtime.
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
Do you mean you want to programmatically add/modify the connection string stored in the web.config file?
Regards - J O H N -
|
|
|
|
|
yes
i want to programmatically add/modify the connection string stored in the web.config file
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
Create a XMLDocument Object and Load the XMLFile (web.config) into it, then Navigate through the Nodes and find the attribute of the corressponding Connection string Node in the config file and modify the inner XML of the attribute.
Regards - J O H N -
|
|
|
|
|
Note that changing the web.config will force your app domain to restart.
|
|
|
|
|
then how can i resolve this issue
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
If you must be able to change connection string programatically, then i would recommend storing them in a separate config file and writing your own code to access them.
|
|
|
|
|
Perhaps you should ask about what you are trying to accomplish, rather than how to implement it the way that you think that it should be implemented...
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
i use this code for adding pr modifing connection string.
Dim mydoc As System.Xml.XmlDocument = New System.Xml.XmlDocument<br />
mydoc.Load(Application.StartupPath & "\..\..\app.config")<br />
Dim node As System.Xml.XmlNode = mydoc.SelectSingleNode("configuration/connectionStrings/add")<br />
Dim attribute As System.Xml.XmlAttributeCollection = node.Attributes<br />
attribute(1).Value = ConnectionString<br />
mydoc.Save(Application.StartupPath & "\..\..\app.config")<br />
but Paddy Boyd said above
Note that changing the web.config will force your app domain to restart.
so i want to resolve this issue
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
BasharatAli wrote: so i want to resolve this issue
First of all that is not a issue. That is one of the property of the .NET Framework that if you make any changes to the Configuration file, your webapplication will automatically restart since all the application level setting resides in the web.config file. By the way why you are programmatically modifying the web.config file. You can have multiple Connection strings in the Web.config file and access it in your code whichever you want.
Regards - J O H N -
|
|
|
|
|
This is still just a question about how you implement the specific solution that you have chosen for your problem. Noone knows what is it that you are trying to accomplish really.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
i'm trying to generate connection string dynamicaly.
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|