|
While Adding A Ref in visual studio
u actually creates an instane of that dll in the \bin\Debug folder
Check it...
The dll "walks with u"
if the dll can be decompiled and u can open it with VS and see it's Content
well that's it, just copy the function to a .cs file under your namespace
And god Speed
Have Fun
Never forget it
|
|
|
|
|
I am trying to update row in sql database but unable to do it .. this is what i have done so far ..
protected void UpdateCommand(object source, DataGridCommandEventArgs e)
{
Response.Write("testing");
SqlConnection conn = new SqlConnection(connectionString);
try
{
conn.Open();
string database1 = "Level1";
TextBox UserName = (TextBox)(e.Item.Cells[2].Controls[0]);
TextBox MacAddr = (TextBox)(e.Item.Cells[3].Controls[0]);
DataSet ds = new DataSet();
SqlCommand myCommand = new SqlCommand("UPDATE " + database1 +
" SET UserName = '" + UserName +
"', MacAddr = '" + MacAddr+" ' ", conn);
myCommand.Connection = conn;
myCommand.ExecuteNonQuery();
}
catch (Exception ex)
{
Response.Write(ex.Message);
Response.End();
if (conn != null) conn.Close();
return;
}
finally
{
Response.Redirect((string)Session["PreviousURL"]);
}
conn.Close();
DataGrid1.EditItemIndex = -1;
can someone help me how to update after we clik edit button in each textbox in a row ??
Thanx !!
|
|
|
|
|
Why all The mess
Why not just using the : SqlDataAdaptor
i've been using OdbcDataAdaptor, & OledbDataadaptor
and it's easy
no 100 Line codes, but half and even less
Try it
It's actually creates a conector betwen your DB and your Data Grid
Have Fun
Never forget it
|
|
|
|
|
ya i know its really using OledbDataadaptor but my database is not in MS Access but in Sql Server... so everything i need to write is using sql commands .. can u help me with that ?
|
|
|
|
|
|
Here is a Better Article [^]
that got all of the connection (Odbc,Oledb,Sql,Oracle)
That realy Good
Have Fun
Never forget it
|
|
|
|
|
Dear Friends,
How we can keep data after inserting in formview controls?.
When i'm inserting a record formview will fire a method, that method is calling a stored procedure. If Stored Procedure is return error i want to keep data in my formview.
How i can solve this issue?
Haridas.R
harisofttech@gmail.com
harisofttech@hotmail.com (online)
harizeenet@yahoo.co.in(online)
"Achievement is not a destination, its a journey "
|
|
|
|
|
Hi...
I have a really strange behaviour in a piece of code where I'd like to encrypt and decrypt data. I wrote a small program to test, when I saw that everything was working fine I did a copy/paste of that code in my main app...
I can't understand why: in my main app the decryption, when I do the FlushFinalBlock(), throw me a Bad Data...
The strange thing is that when I encrypt in my main app, the decryption in my test program works fine...
any idea?
Thanks
|
|
|
|
|
I got a similar behaviour when I didn't close the encrypt stream correctly. It didn't write the final bytes until I did that.
|
|
|
|
|
I have written a small app for displaying a web site, the app will check where the navigation is going etc before alowing to proceed.
everything works well apart from one thing, one of the pages has a map written in flash, now when viewed using ie you can drag an item around the map, when i view in my app the flash map is very jerky and doesnt alway move the item round the map... i am wondering if there is something in the program which could be taking the focus and not allowing the flash to work properly...
anyone got any ideas ??
Thanks
Lee
|
|
|
|
|
We've seen various issues with Flash as well, and with the WebBrowser in general. There seems to be some mouse activation/clicking bugs that are caused by the managed WebBrowser. I'd try using the unmanaged mshtml COM component (upon which the WebBrowser is based) and see if anything is fixed for you.
|
|
|
|
|
Hi All,
I need to know how can i find some windows id -
I will explain - some application launch my win-form application - this my Form need to be on always on top of this application. So i want need to know the windows id of the application.
I can know the title of this application ( with windows title ).
Thanks for the help.
|
|
|
|
|
You would need to use the FindWindow function from the Win32 API. Check this[^] out for an example of finding the window handle.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
HI,
I like to know this :
if someone wrote an Interface using VS 2005 C++
Can i Use it In my C# APP?
THANKS
Have Fun
Never forget it
|
|
|
|
|
I think you can, if it's compiled into a .NET dll.
|
|
|
|
|
If it's a managed C++ interface, then yes. Check this[^] out for an example.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
THNKS
that really Halped
Have Fun
Never forget it
|
|
|
|
|
half-life wrote: if someone wrote an Interface using VS 2005 C++
You think "an Interface" is specific? What is your background? Are you web developer?
|
|
|
|
|
|
half-life wrote: an Inerface Like ImyInterface
Which need's to be implemented
Virtual Func....
Only if it is developed as a Managed interface using C++/CLI. A native C++ interface is a class and cannot be accessed from managed code.
|
|
|
|
|
|
I am trying to get Mono.GetOptions to work in my CSharp application that I am building using VS 2005. The application is failing to compile, complaining that my Options subclass does not contain an data member. However, I have clearly defined this member, and it shows as being part of the class when using the Class Browser interface.
Here is the message - "Error 1 'Mono.GetOptions.Options' does not contain a definition for 'file' "
but file is in the class as "public string file" .
Any ideas on what I can do to fix this issue? I will even take suggestions on using a command line parser that is similar to GetOptions.
John Gooch
|
|
|
|
|
You will need to post more code to get a better answer. But I'm assuming that you need to cast the return value of the Mono.GetOptions to your custom options type. Mono.GetOptions will return an object of type Options. If you have a custom Options class, say MyOptions, then you need to cast it to that type in order to access it's members. Like so:
MyOptions o = (MyOptions)Mono.GetOptions(...);
String s = o.file;
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Here is the where I define the class:
<br />
public class SampleOptions : Options <br />
{<br />
[Option("Write report to FILE", 'f')]<br />
public string file;<br />
<br />
[Option("don't print status messages to stdout", 'q')]<br />
public bool quiet;<br />
<br />
[Option("Sample int option", "use-int")]<br />
public int use_int;<br />
<br />
public SampleOptions()<br />
{<br />
base.ParsingMode = OptionsParsingMode.Both;<br />
}<br />
}<br />
<br />
And then I create and use it as per the example I linked to above(It errors on the Console.writeline line) :
<br />
static void Main(string[] args)<br />
{<br />
Options myoptions = new SampleOptions();<br />
myoptions.ProcessArgs(args);<br />
<br />
Console.WriteLine("File name is {0}.", myoptions.file);<br />
<br />
}<br />
<br />
<br />
<br />
John Gooch
|
|
|
|
|
Your problem is with the following line and is what I suspected:
Options myoptions = new SampleOptions();
The myoptions variable is of type Options, not SampleOptions. Eventhough, the actual instance is a SampleOptions, since the variables type is Options it cannot see the file field (which is defined in SampleOptions).
If you update your code to be:
SampleOptions myoptions = new SampleOptions();
Then myoptions will be of type SampleOptions and will be able to see any fields defined in it.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|