|
how to save , edit,querry a database using C# toolbar
|
|
|
|
|
What's C# toolbar? Is this something you designed?
|
|
|
|
|
hi all
how i can convert the language (English to Arabic) When i Leave the TextBox1 to TextBox2 The Convert just in text language as
TextBox1 is write in English language and the TextBox2 is Write by Arabic Language
thanks for all body hellp me
Thaer
|
|
|
|
|
First you will need to catch textbox2 enter event. In that event you can change input language. Then set input language using InputLanguage Class
|
|
|
|
|
thanks Mr Giorgi Dalakishvili
but your answer is not Complete my Quesion
Pleas if you have Code To ny Quesion Give me it
thanks Mr
Thaer
|
|
|
|
|
First, you have asked this question before. Second, this forum is for people who are having issues with existing code. Asking someone to just hand over the code so you don't have to work on it is considered RUDE.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
No one is going to give you complete code here. I gave you directions and you can explore them. If you are stuck at a specific point please say so and I'll be happy to help you
|
|
|
|
|
do you want to enter english in tb1 and enter arabic in tb2, or enter english in tb1 and have it translated into arabic and displayed in tb2? The existing answer will let you do the former, the latter will require buying 3rd party translation software. I have no recommendation for this.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Hi,
I have the following code to upload one file.
private void cmdUpload_Click(object sender, System.EventArgs e)
{
if (( File1.PostedFile != null) && (File1.PostedFile.ContentLength > 0))
{
//determine file name
string sFileName = System.IO.Path.GetFileName(File1.PostedFile.FileName);
try
{
if (File1.PostedFile.ContentLength <= lMaxFileSize)
{
//Save File on disk
File1.PostedFile.SaveAs(sFileDir + sFileName);
lblMessage.Visible=true;
lblMessage.Text="File: " + sFileDir + sFileName + " Uploaded Successfully";
}
else //reject file
{
lblMessage.Visible=true;
lblMessage.Text="File Size if Over the Limit of " + lMaxFileSize ;
}
}
catch(Exception)//in case of an error
{
lblMessage.Visible = true;
lblMessage.Text="An Error Occured. Please Try Again!";
DeleteFile(sFileDir + sFileName);
}
}
}
I want to upload two files intead of one.
Please help.
|
|
|
|
|
I have a mulitline text file that has repetitive info in the first 29 characters.
My program will strip the extra garbage off from each line and append it to the previous line.
It also will change the color on specific lines of text, at a specific position, and it opens into a RichTextBox.
I would like to speed this up somehow. Depending on the size of the file it takes a long time. I want to be able to apply the formatting etc while the file is in a buffer I guess, and then display to the RichTextBox.
Thanks,
|
|
|
|
|
Hi
well I have an XML file and an XSL file to transform that. I want to show the XML file in the webbrowser control having the transformation on using the XSL file. As most of u must be knowing that we need to add a statement such as the one given in bold after the <xml> tag.
<?xml version="1.0" encoding="utf-8"?>
<b><?xml-stylesheet type="text/xsl" href="c:\xmlDefaultStyleSheet2.xsl"?></b>
Is there some way so that I can just write that portion to my xml file and show it in the browser (modifying the file) so that I dont have to write a new xml file altogether?
Thanks in advance
Rocky
|
|
|
|
|
Rocky71 wrote: Is there some way
No. But there is a way you can keep from re-writing the xml source file, by performing the transformation yourself and load the results in the browser.
|
|
|
|
|
OK so can u give me an example for that...
|
|
|
|
|
|
Yea I think I get the idea now Mike... its about using XslTransform Function right
|
|
|
|
|
There's still a small problem.. The example is given like this
XslTransform xslt = new XslTransform();<br />
<br />
xslt.Load("http://server/favorite.xsl");<br />
<br />
XPathDocument mydata = new XPathDocument("inputdata.xml");<br />
<br />
XmlWriter writer = new XmlTextWriter(Console.Out);<br />
<br />
xslt.Transform(mydata,null,writer, null);<br />
<br />
The XmlWriter is throwing its output on the console but how can i throw the output on my webbrowser control w/o making a new file? the transormation doesnt create HTML it only chnges the way XML is diaplayed. infact it just collapses all the nodes
|
|
|
|
|
Rocky71 wrote: how can i throw the output on my webbrowser control
Hey Rocky, glad to see things are progressing. Before we move on to the next problem I would take a moment to note that your original post was rather vague on this second problem. Strict interpretation of it notes that you didn't want to re-write your XML "Source" file. The solution we discussed solves "that" problem.
Next make sure that writing the transformation output to disk actually is a problem and if it is then you can use the WebBrowser.Document property to access the HtmlDocument object which has a Write(...) method.
However, my experience doing that with complex javascript in the resulting HTML tells me that some odd behavior can occur using this approach. I don't remember the details but in one instance I had to accept the limitations presented at the DHTML level while in another instance I had to adopt a temporary file solution that wrote the transformation to disk.
Hope that helps
|
|
|
|
|
<blockquote class="FQ"><div class="FQA">led mike wrote:</div>your original post was rather vague on this second problem</blockquote>
u know what you're absolutely right!! I wasnt very clear in my mind myself
<blockquote class="FQ"><div class="FQA">led mike wrote:</div>The solution we discussed solves "that" problem</blockquote>
well I'm not so sure abt that. Bcz when i tried to make a new file I adds those <HTML> and some other 'unwanted' tags from HTML and the resultant output is not what I want. The problem is that when i add the refrence to my XSL file in the XML file and then open it in IE it shows the thing I want to see that is all nodes collapsed but when i try to put the transformation on the same XML file (without the reference to xsl file) it gets all messed up bcz of the added HTML tags in the new file made.
The XML files in my case can be very large in size I thinkits size can go into MBs as well so that was the reason I was trying to avoid this rewriting of file.
Actually to be honest I'm totally agaisnt this idea of showing an XML file in WebBrowser Control bcz large XML file can take forever to open up and I dont think there's any way in the world tat we can put some kind of transformation (like collapse all nodes) on without having to refresh the file and open it again + there is alot of chance of having to rewrite it again and offcourse that would be disastrous. I'm the junior most person in the team so who listens to a guy like me
Hope I got it quiet clear this time
Thanks for ur help
Rocky
|
|
|
|
|
Rocky71 wrote: I adds those and some other 'unwanted' tags from HTML and the resultant output is not what I want.
Then modify the XSLT to output "exactly" the HTML that you desire. Or I don't understand what you are saying.
Rocky71 wrote: I dont think there's any way in the world tat we can put some kind of transformation (like collapse all nodes) on without having to refresh the file and open it again
This is the first I am hearing about "collapse all nodes". Is this one of your requirements? When you post a question on a forum like this and leave out critical requirements you might get answers that take you down the wrong path. This may be one of those instances.
|
|
|
|
|
led mike wrote: This is the first I am hearing about "collapse all nodes". Is this one of your requirements?
well it was a requirement and I've already made an XSL file that collapses all nodes of an XML file in IE that is. I'll show you the code when i go back to office on Monday.
led mike wrote: Or I don't understand what you are saying.
well I've got a bit confused myself I think I have to look at the xsl file again when i get back on monday
Thanks a lot I appreciate it
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Hi,
I have a windows forms GUI app which I would like to convert to run sliently.
The forms app has three input variables, which I have now put in a .config file.
Now, within the main program, I would like to call a module - it keeps coming back with error message.
within main - module - processXML(_source);
module definition: public void processXML(string _source)
error:
Error 1 An object reference is required for the nonstatic field, method, or property 'convertXML.onLoad.processXML(string)'
Any thoughts?
Many thanks.
|
|
|
|
|
This really needs more information, but making a couple of assumptions:
1. convertXML is your main form
2. onLoad is an event handler for the Form's Load event
Based on these assumptions, you can't write code like:
convertXML.onLoad.processXML(string) You would need to call your processXML method from inside the onLoad method.
A few other things...you really should adjust your naming conventions to follow the de-facto standard of camel casing. This would change your names to "ConvertXml", "OnLoad", and "ProcessXml".
Also, what is the intention of running this "silently"? Is this a process that is always supposed to be running in the background? If that is the case, you should think about converting this to run as a Windows service.
|
|
|
|
|
I need to then schedule this out on a windows scheduler to automate this whole process.
I cannot put this windows gui app in scheduler since it would require human interaction to enter those three input variables.
you are right about the assumptions.
Thanks - will try what you mentioned.
|
|
|
|
|
In that case, putting them in a config file or being able to accept them as command line parameters would be the right way to go.
|
|
|
|
|
I'm developing an application.It runs on a network.There is a login form .I want the application if i logged on another machine to exit the first application which logged first .Such as Yahoo login form.
How can i do that.
MD_NADA
|
|
|
|