|
You can change the URL of a web service dynamically.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for your reply.
I'm beginner in these web services so my question may be very silly too sometime. Yeah I came across that option of changing the URL dynamically. But in that case if I'm right the service directory and service file should it be same? A sample code would help me a lot. And after this how will my CSR invoke the service and get the result and give it back to the requested client? I'm kinda confused in this part too.
|
|
|
|
|
DotNet novice wrote: Yeah I came across that option of changing the URL dynamically. But in that case if I'm right the service directory and service file should it be same? A sample code would help me a lot.
I did this a back while, but unfortunately the code was for an application built for another company, so I can't share any of that code.
The principle however, is simply to create the object for the proxy and then change the property for the URL. I don't remember the details, but I was able to find it quite easily, and you even know what to look for.
DotNet novice wrote: And after this how will my CSR invoke the service and get the result and give it back to the requested client?
Once you changed the URL you use the proxy as normal. To get the result back to the client you just return it as usual (whether it's a web service or a web request).
---
b { font-weight: normal; }
|
|
|
|
|
I have a "test.cmh" help file that I compiled. Is there a way to restrict the use of the help file to be used only via an C# applications?. in other words, the CHM file will not run when user click on it.
|
|
|
|
|
Simply: No I don't think so unless you want to embed the help file as a resource and then extract it when you need but I'm not sure that this will work.
Another simple protection method would be to give it a different name without the .chm extension, for general users they wouldn't change the extension, but then again they probably wouldn't look for it.
Ed
|
|
|
|
|
I am facing problem to populate data grid control by oleDbDataReader object.
How to do it.
Shoaib Nawaz
|
|
|
|
|
Hey Guys, the windows application I use is in Persian, so when I enter to my form I gotta press SHIFT+ALT to change the language to persian from english, I'm looking for a code that does this for me !!! for example whe i load my form it authomatically chnages the language to persian and vise versa.
Thanx
Mr.K
|
|
|
|
|
You can set Thread.CurrentCulture and Thread.CurrentUICulture.
|
|
|
|
|
I was working on a project for a client who runs a scheduled backup daily. He needs to stop the SQL service, which I have done successfully, but I need to find a way to access a tape drive to see that the tape is actually inserted. I do not know of any way to do this with ntbackup.
I have tried to find this on the web but came up fruitless.
This is a windows form in C#, using .NET Framework 2.0.
The tape drive does not come up in the DriveInfo.GetDrives().
Does anybody know how I can verify that the tape is inserted in C#
Thank you in advance!
Jeremy
|
|
|
|
|
Hi everyone,
I have just began to create applications for Pocket PC, and I'm trying to add clipboard functionality. Unfortunatly the normal code doesn't work for some reason, for example:
Clipboard.SetDataObject(textBox.Text,true);
This works in a normal Win32 application, but when I try to use it in a Pocket PC application it produces this error:
The type or namespace name 'Clipboard' could not be found (are you missing a using directive or an assembly reference?)
Could someone point me in the right direction on how to solve this?
Thanks for any help,
From Daniel
|
|
|
|
|
Hello,
I have a problem with the progressbar in the following code:
FtpClient ftp = new FtpClient("ftpadres", "user", "password",ttl,21);
try
{
ftp.Login();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
ftp.ChangeDir("vrbo");
string fullPath = txtLoggedInSource.Text;
string[] dir = fullPath.Split(new Char[] { '\\' });
int length = dir.Length;
string directory = dir[length - 1];
ftp.MakeDir(bedrijfid + "_" + directory + "_" + timestamp);
ftp.ChangeDir(bedrijfid + "_" + directory + "_" + timestamp);
DirectoryInfo dir2 = new DirectoryInfo(txtLoggedInSource.Text);
FileInfo[] files = dir2.GetFiles();
int filecount = files.Length;
pbStatus.TabIndex = 0;
pbStatus.Maximum = filecount;
pbStatus.Minimum = 1;
pbStatus.Step = 1;
/* THIS WORKS PERFECT !!!
for (int i = pbStatus.Minimum; i <= pbStatus.Maximum; i++)
{
pbStatus.PerformStep();
}
* */
// HERE THE PROGRESSBAR DOESNT MOVE
foreach (FileInfo f in files)
{
ftp.Upload(txtLoggedInSource.Text + "\\" + f.Name);
pbStatus.PerformStep();
}
label1.Text = "All files are upload successfully";
ftp.Close();
Can someone please help me why it doesn't work with upload
Thx
wistiti 5
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
---
b { font-weight: normal; }
|
|
|
|
|
You're not giving the form a chance to update itself. See if this works:
foreach (FileInfo f in files) {
ftp.Upload (txtLoggedInSource.Text + "\\" + f.Name);
pbStatus.PerformStep();
Application.DoEvents();
}
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
-- modified at 0:15 Sunday 23rd April, 2006
|
|
|
|
|
Ravi Bhavnani wrote: this.DoEvents();
You mean
Application.DoEvents(); no?
Cheers,
Will H
|
|
|
|
|
|
Me and my partner are doing our final year project in Addis Ababa University.
The problem here is eventhough we are using one of the latest voice modems we can not have a live communication up on connecting calls. We have a demo C# code which can record calls (that worked).I donot think it is the code's problem but I wish if you guys out there help me use my voice modem for live connection.
|
|
|
|
|
Have you seen the TAPI articles here on code project.
|
|
|
|
|
How can I export a Ms Word file to text?
I need it badly! pleasssssse help me soon as possible.
|
|
|
|
|
hi Sahar
Try this code. I actually found an article from C-Sharp Corner on how to open up a word file in C#. You just have a look on that article, I added to the code a little to meet ur requirement.
//Create Word Application class.
Word.ApplicationClass app = new Word.ApplicationClass();
//file which you need to convert to text file
object fileName = @"Sample.doc";
//to set the source file readonly.
object readOnly = true;
object missing = Type.Missing;
//to make the document visible.
object visible = true;
app.Visible = true;
app.Documents.Open(ref fileName,ref missing,ref readOnly,ref missing,
ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,
ref missing,ref visible,ref missing,ref missing,ref missing,ref missing);
//select the whole text in Word file
app.Selection.SetRange(0,app.Selection.StoryLength);
//get the selected text, the whole word file content.
string text = app.Selection.Text;
//create StreamWriter Object.
System.IO.StreamWriter writer = new System.IO.StreamWriter("YourTextFile.txt");
//split the text in to lines.
string []lines = text.Split(Environment.NewLine.ToCharArray());
//Iterate over each lines and write to file.
foreach(string s in lines)
{
//write a line to file.
writer.WriteLine(s);
}
writer.Flush();
writer.Close();
My small attempt...
|
|
|
|
|
Hai,
i am using crystal reports for my application.it is working fine in development machine ,after creating setup project and installation in any machine that time error is coming like error in file c:\doc\..\temp\temp_e68 _...._.rpt invalid table number.
it is working fine from application,after installing msi then only this problem is coming.
i tried a lot for this,but iam unable to find the solution.
any one have any idea.
thanks in advance.
|
|
|
|
|
I ran into a similar problem a while back. Do you have the crystal reports prerequsite checked?
If not, do this:
1. Go to solution explorer.
2. Right click on your setup project and hit properties.
3. A form should popup with the projects properties, find the button that says: Prerequsites.
4. From the list that appears check: Crystal Reports for .Net Framework 2.0.
Build the setup project and your done!
Now if you go to the setup folder in your project directory, you will see that it has added the necessary components to get crystal reports working on the target machine.
Hope that helps 
|
|
|
|
|
Hi,
I have a form on which there is a textbox and a datagrid. Both the text box and datagrid are bound to some data sources. There are only two columns in the datagrid. The text box basically displays a column of the datagrid. When the user clicks on the New or Modify button, he is able to edit the value in the text box or add a new one which is added to the bound grid. But the problem is that the Text property of the text box becomes equal to empty string before it is added to the database or the grid. I have checked the source code many time but i dont know why it happens. I have faced the same problem previously but at that time, it became equal to empty string when AcceptChanges() method of the datatable was called. Any kind of help or suggestion please...
Regards,
Wasif Ehsan.
|
|
|
|
|
i'm sorry I really don't know about this. 
|
|
|
|
|
Put a Chatroom in your site easily and free!
Doesn't requiere other apps runing on server. Very simple to implement.
It uses the same ISS as the chat server so you don't need to run other apps. The client is your web browser. Very easy to implement and to expand to build on. And free!:
http://www.spilafis.com.ar/ChatAjaxNet.aspx[^]
spilafis
http://www.spilafis.com.ar
-- modified at 1:08 Saturday 22nd April, 2006
|
|
|
|
|
Nice idea, just a pity it locks up IE... and with free, does it include full source too? If so, why not post an article?
|
|
|
|