|
OK, that all makes sense and you seem to have the right idea when it comes to building your XML and using it.
So what part do you think you need help on? Sounds to me like you could have a stab at trying to create this text editor and post any specific coding questions if you get stuck!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
I haven't touched .NET for 2 years so I don't remember much.
The main problem is: if I use textbox ot richtextbox how can I output it's contents into the required XML format. For example it's not clear to me. How should I recognize if a character has some special formatting and also how can I add for example a area where the number of a given line is displayed, it's style, etc.
I hope it is understandable.
|
|
|
|
|
I need to develop a small application,
from which i need to insert data into the SQL Server.
I am using ADO.Net.
pls give me some sample code if possible.
or refer me to a suitable article.
Thank U.
|
|
|
|
|
Hello dear friend
Please notice below codes
We have a table with 3 fields as :
(field1:Int, field2:NVarChar, field3:Bit)
At first of your form add these namespaces:
<br />
using System.Data;<br />
using System.Data.SqlClient;
Now add these sample lines to your Button_Click() event :
<br />
string strInsert="INSERT INTO table (field1,field2,field3) VALIUES (@field1,@field2,@field3)";<br />
if (SqlConnection1.state.toString() != "Open")<br />
SqlConnection1.Open();<br />
sqlCommand cmd = new SqlCommand(strInsert,sqlConnection1);<br />
cmd.Parameters.Add(new SqlParameter("@field1",SqlDbType.Int,4,"field1"));<br />
cmd.Parameters["@field1"].Value = 1000;<br />
cmd.Parameters.Add(new SqlParameter("@field2",SqlDbType.NVarChar,10,"field2"));<br />
cmd.Parameters["@field2"].Value = "California";<br />
cmd.Parameters.Add(new SqlParameter("@field3",SqlDbType.Bit,1,"field3"));<br />
cmd.Parameters["@field3"].Value = true;<br />
cmd.ExecuteNonQuery();<br />
Don't remember to define SqlConnection
if you have any problem mail me
Bye Bye
-- modified at 2:13 Monday 8th May, 2006
|
|
|
|
|
Really i am very thankfull 2 U.
|
|
|
|
|
for vb.net and asp.net
imports system.data.sqlclient
dim con as new sqlconnection
dim cmd as new sqlcommand
con.connectionstring = "Provider= the provider u use;user id= ;password= ;
data source= sql server name ;initial catalog= database name "
cmd.connection = con
con.open()
cmd.commandtext = "insert into tablename values('" & tid.text & "')"
cmd.executenonquery()
con.close()
if u have any problem with this revert back vil help u out
regards
kalyan
|
|
|
|
|
Hi..
I want to use the CmdLoadFromResource() method of ths speech SDK 5.1 to make the xml file that includes the Grammar embeded but i dont know how to use this method in C#.
This code shows how i used this method:
[System.Runtime.InteropServices.DllImport("kernel32")]
private static extern long LoadLibrary(string lpLibFileName);
private void button2_Click(object sender, System.EventArgs e)
{
this.objRecoContext = new SpSharedRecoContext();
this.objRecoContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(RecoContext_Recognition);
this.objRecoContext.State=SpeechRecoContextState.SRCS_Enabled;
grammar = objRecoContext.CreateGrammar(0);
int hModule=Convert.ToInt32(LoadLibrary("ReviewWinApp.dll"));
int langID=409;
grammar.CmdLoadFromResource(hModule,"tryRecog.xml","CFGGRAMMAR",langID,SpeechLoadOption.SLODynamic);
grammar.State=SpeechGrammarState.SGSEnabled;
grammar.CmdSetRuleIdState(1,SpeechRuleState.SGDSActive);
}
When i click this button i got the error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ReviewWinApp.exe
Additional information: The specified resource type cannot be found in the image file.
Iam not good in COM programming.Could any one give me a C# code sample for using this method?
|
|
|
|
|
Hi everybody,
I want to call a secure web page through desktop application. Though .net automatically validates it but i want to get the exact status of error. In previous version certificatePolicy property of ServicePointManager was used for this purpose but now it is obsoleted. They have provided another function ServerCertificateValidationCallback but when I reach at the statement, it gives an error :
"System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
|
|
|
|
|
Hi everyone... i am trying to look for a way to configure IP settings for a windows machine from C# code...
I mean, to change the local machine, mask and gateway IP addresses...
Can anyone please give me an idea of how can i do this...
Thanks
|
|
|
|
|
|
tnaks, sure it'll help!!!!
|
|
|
|
|
I used textbox to input data in my program, but as I used int input=covert.toint32(textBox.text) to accept the input value, I could not run this program. I am using vs2003, that code was in button_click event. Thanks for your help.
|
|
|
|
|
Try:
int input = Int32.Parse (textBox.Text);
Be sure to check for an exception.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
WEll, if you typed it exactly like that, it won't work, as C# is case sensitive. To help people trying to help you, so we don't need to take wild guesses, you should define 'I could not run this program'. Did it compile ? Did it crash ? Did it do something you did not expect ?
If you use int.TryParse, you can avoid catching an exception
int input;
if (int.TryParse(textBox.Text, out input))
{
// This means that textBox.Text contained an int, it's now stored in 'input'
}
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you guys so much. I got my answer, and sorry for the typo.
|
|
|
|
|
C# is Case sensitive .Through with Syntaxes then u can proceed
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshers
http://himabinduvejella.blogspot.com
|
|
|
|
|
I'm making a client-side application that monitors the status of a website and reports what it finds. I have that part working, but now I need to add the ability to have my application automatically submit information through a form on the site (textboxes and submit button style.) I have no clue how to do this, any suggestions?
Thanks
|
|
|
|
|
Examine the source HTML of the form you want to submit. Then use this[^] to work the magic. In particular, see this application[^] for an example of form submission.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Hello
A binary container image F is regularly partitioned into small pixel blocks Fi of a size m×n (for simplicity, assume that F’s size is a multiple of m×n).
How to divide binary image into blocks of size m*n?( Block = matrix of size m*n)
Thanks
Peter
|
|
|
|
|
I assume that you have the image in a Bitmap object?
Create a new Bitmap object of the size m*n, and draw part of the original image onto it using a Graphics object.
---
b { font-weight: normal; }
|
|
|
|
|
Hi! I'm trying to use PInvokes CopyFileEx[^]. I have everything right except i am getting an error for the last parameter:
The name 'COPY_FILE_FAIL_IF_EXISTS' does not exist in the current context
copyFileClass.CopyFileEx(
path,
path2,
new copyFileClass.CopyProgressDelegate(cfc.progress),
0,
false,
COPY_FILE_FAIL_IF_EXISTS);
Could someone point me in the right direction please? Thank you in advance
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
|
thanks alot man this will help out alot
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
well hello evry one...
well I'm leorning c# programing and I was asked to program a "sharing files program" like emule or kazza...
but!!! a program that will share source codes( :
so I've started working on it... and now the problem is that what I need to do is to accept clients and get them in into a collection and from there I sould open a differnt thread foreach one of them so when some client is looking for some kind of file the server will make the conection between the user who got the file and user woh is looking for it and from there I sould do remoting...but as I said the problem is that I tried many ways but I cant make it work) :
so if someone can help me with this please please please I have to hand over the project by wensday...
tanks
dudi
|
|
|
|
|
hakerf***er wrote: I have to hand over the project by wensday...
What have you been doing all semester?
/ravi
|
|
|
|