|
Hi all,
Any one suggest me how to edit my url and submit the page on button click with out using Response.redirect.
for eg:
www.mysite.com/default.aspx
this is my page, on button click the page should submit and reload, the url should look like www.mysite.com/default.aspx?step=1 (no response.redirect, because i am losing the viewstate even though i set the EnableViewState="true")
Thank you
Know is Drop, Unknown is Ocean
|
|
|
|
|
You'll probably get better answers over in the ASP.NET forum[^].
Simon
|
|
|
|
|
Hello,
What you are asking is to change to url, while doing a postback event.
I'm sorry, this can't happen in a fashionly manner. When you use a redirection (or a hyperlink -- so whenever you modify the url), you will lost the viewstate.
Why is that so? Because viewstate is stored in a form value. It is actually stored into a hidden field of the page. If you change the url, the data in this field is lost because you are causing a page change, not a page postback event.
You should post here what you want to do, we can help you manage the situation in another way.
One suggestion here could be that you use the ViewState object instead of a query string parameter to manage the current step of your wizard.
|
|
|
|
|
Hi All
Im trying to connect to connect to exchange using webservice. Im trying to find out is there any other way to connect to exhcnage rather than the webservice. I wrote the the webservice for exchange but im having any luck connecting to exchange even when i install the certificate (SSL) that is required.
Thanks in advance
|
|
|
|
|
hi
i m using
System.IO.File.Copy()
to copy files. But i want my files should copy more fast. Is there any way to do this.
thanks in advance...
|
|
|
|
|
There is no single alternative that is guaranteed to be faster. You have to take advantage of the specific sitation that you have to find an alternative that uses the hardware more efficiently.
For example, are the drives two separate physical units, so that it makes sense to read and write simultaneously? Do you have a few large files or a lot of small files?
What is the physical connection to the drives? ATA? SATA? USB? Firewire? USB and Firewire have limited bandwidth, so you can't get more than about 30 MiB/s.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I M copying files from Usb to my hard drive and having both small and large file in the directory.
|
|
|
|
|
Work out what is causing the bottleneck.
1) CPU - Unlikely.
2) Drive speed - possibly.
2a) Read drive speed.
2b) Write drive speed.
3) Transfer speed - possibly.
3a) IDE/SATA?
3b) Sharing the same cable?
3c) Over a network?
3c.i ) Wifi?
3c.ii ) LAN?
3c.iii) Internet?
3c.iv ) Proxy?
3c.iv ) Protocol?
Then improve the bottle neck area.
Assuming you're not transferring over a network, your bottle neck is either drive access speeds, or cable transfer speeds. Assuming the drives aren't sharing the same cable and you are already using SATA, your only option is to buy faster drives.
Simon
|
|
|
|
|
sumit7034 wrote: System.IO.File.Copy()
My guess is M$ would have already written optimized code for file copy there. Maybe you can call system level routines using VC++ to address the issue in a fine-grained level but that would need some research.
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
Hi Guys,
is there an easy way to show a linklable in a messagebox?
Many Thanks,
Phil
|
|
|
|
|
Not sure, but there are many ways to create a custom MessageBox.
Google and see if this[^] can help.
I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]
My blog
|
|
|
|
|
Hello all i tried the code below but bot working plz help.....URGENT
string[] drivelist = Environment.GetLogicalDrives();
for (int i = 0; i < drivelist.Length; i++)
{
System.IO.DriveInfo di = new System.IO.DriveInfo(drivelist[i]);
System.IO.DirectoryInfo dirInfo = di.RootDirectory;
System.IO.DirectoryInfo[] dirInfos = dirInfo.GetDirectories("*.*");
foreach (System.IO.DirectoryInfo d in dirInfos)
{
string s = d.Name;
try
{
string[] files = Directory.GetFiles(drivelist[i] + d.Name, "csc.exe",SearchOption.AllDirectories);
int n = files.Length;
if (n == 1)
MessageBox.Show(d.Name);
break;
}
catch (Exception)
{ }
}
}
Tony j sebastian
|
|
|
|
|
tonyjsebastian1 wrote: catch (Exception)
{ }
And how do you expect the code to work?
I guess some directory Permission exception is thrown. Certain directories in Windows drive are forbidden even for Admin.
Use recursion instead of
<br />
Directory.GetFiles(drivelist[i] + d.Name, "csc.exe",SearchOption.AllDirectories);<br />
Wait I answered this question in your previous thread. Did you even care to try that way!
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
tonyjsebastian1 wrote: .....URGENT
Yeah, probably![^]
I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]
My blog
|
|
|
|
|
If you want to get csc.exe, it is located in the Framework directory (usually C:\Windows\Microsoft.NET\Framework\[version]).
You can get that directory by calling System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()[^]
If you want to get the Framework directory for a version different from the one running your application, the operation can be more tricky: you must dllimport GetRequestedRuntimeInfo()[^]
Edit: I have seen just now your double post, if you had waited a little more (and maybe if you did some Google search) you'd get your answer in the right thread in a more clear way...
|
|
|
|
|
hello Mikro1980
let me introduce my self as Tony.
i am very thankful to u Mikro for giving me the answer what i was exactly looking for the past 2 days.
Thanks & Regards
Tony J Sebastian
|
|
|
|
|
hello all
I wish to get the path of the file named csc.exe from the system.
To do this the drives in the system are not known.. so first find the drives(c,d,e etc......) in the system and perform a search???
is thr any alternative exists.... like getting the path from the windows registry.... for the specified file.. by some search
How to implement this using C# code??
Urgent plz HELP ====
TJS
|
|
|
|
|
Yes, you can query Registry to get the path to your current Windows directory. From there, you can move to Microsoft.NET/Framework/v (version number)
I guess you can get both the information (of version number and windows directory) using System.Environment rather than querying the registry. Just check once
tonyjsebastian1 wrote: Urgent plz HELP
If you stopped using that, google would stop indexing us on those words
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
Start with @"%SystemRoot%\microsoft.net\framework\"
Remember that there are several versions of csc.exe and you likely want the newest one.
|
|
|
|
|
Hi,
I developed a windows application.Now after installation it should be shown in system tray beside date & time. Then on the right click of this i have to show some options like enable/disable.
Iam new to c#.Kindly help me on this.
Thanks to all
bye
|
|
|
|
|
Can NotifyIcon[^] help you?
I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]
My blog
|
|
|
|
|
Hello,
I'm puzzled with a simple issue in finalizers. If I have a class containing a reference to an object, isn't it supposed that the referenced object isn't applicable for GC collection except after my object is finalized?
|
|
|
|
|
Not at all. As soon as there are no active references to your object, the reference to the other object is also considered inactive. If the other object doesn't have a Finalizer, it's very likely that it will be garbage collected first.
You can't rely on the order that the objects are garbage collected, so you can't use the Finalizer for cleanup. That is what the IDisposable interface is used for.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Yes, I read about that, but it doesn't make much sense to me. Regardless, what can I do if I need to enforce an order for finalizers? Both objects have critical finalizers, but one of them must run before the other; otherwise an access violation occurs...
Thanks for your help
|
|
|
|
|