|
Those are types that you haven't defined in your code anywhere. Well, anywhere accessible to the code having the problem anyway. You won't find those types anywhere int he .NET Framework, so you have to write them yourself.
Ahh, the joys of Copy'N'Paste coding...
|
|
|
|
|
Dave Kreskowiak wrote: Ahh, the joys of Copy'N'Paste coding...
Cross-language copy-n-paste is the BEST!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
queries365 wrote: If better way possible, please suggest
System.Diagnostics.Process.Start(ProcessStartInfo)
If you must use interop, you can find the macro declarations in the
Win32 SDK header files. For example:
SECURITY_ATTRIBUTES is declared in winbase.h
SECURITY_IMPERSONATION_LEVEL and TOKEN_TYPE are declared in winnt.h
You can also often find it already done for you at pinvoke.net[^]
(I recommend verifying and testing - I've seen incorrect stuff there).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hai,one and all,
i want to create a usercontrol in the form of a window form that usercontrol can be used to display data from database to frontend,that user control should contain a datagridview ,that usercontrol should be used in entire application.how to create the usercontrol,plz give me that type demonstration.
thanks in advance.
|
|
|
|
|
You write code. It sounds like all you're talking about IS a datagrid, so why do you need a control ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
No one here is going to code things for you, sites like rentacoder exist for these things.
|
|
|
|
|
The simplest thing is create a form and put all the controls(grids, labels, textboxes, etc) that you will be needing into that form.
Now go to the class declaration(.cs file) where it says "public partial class Class1 : Form" and change it to "public partial class RSIntexPA : UserControl"
Compile the project and generate it a dll. Now you can use your usercontrol via this dll anywhere.
|
|
|
|
|
I can demonstrate squeezing off a loaf for you...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Dear All,
I am trying to send attachment using MailMessage, attachment method in c#.
sure i recieve the body text but not the attachment it self.
Your Aid is really Appreciated.
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
The e-mail server might be blocking attachments.
|
|
|
|
|
can you give your piece of code?Which will help to give specific answer.
Cheers!!
Brij
|
|
|
|
|
let me understand u, that i can recieve attachment from other emails but not attachment from this code.
I am using MailMessage
[code]
MailMessage m=new MailMessage();
....
m.Attachments.Add(new Attachment(filePath));
SmtpClient sC=new SmtpClient(HOST,PORT);
sC.send(from,to,subject,body);
[/code]
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
What have you tried? You need to post the code you are using to actually add the attachment to the mail message. It's also possible that your email server is blocking the attachment. What type of file are you trying to attach?
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
let me understand u, that i can recieve attachment from other emails but not attachment from this code.
I am using MailMessage
[code]
MailMessage m=new MailMessage();
....
m.Attachments.Add(new Attachment(filePath));
SmtpClient sC=new SmtpClient(HOST,PORT);
sC.send(from,to,subject,body);
[/code]
the file which i am attaching is simply txt file, and for sure i would like to upload different files as doc,pdf,xls,jpg,png and others.
Thanks
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
Have you set breakpoints in your code and verified that the attachment is actually getting created and added to the collection properly?
Also, your code
SmtpClient sC=new SmtpClient(HOST,PORT);
sC.send(from,to,subject,body); doesn't appear to actually send the MailMessage you created.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Thanks for reply, indeed it works if i use the method smtpClient.send(MailMessage m).
but it does not work with smtpClient.send(from,to,subject,body) method.
Thanks a lot, I did it,
I really appreciate your cooperation.
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
Hi All,
I am new to C# programming with ADO.NET. I tried to delete the specific row but it is not getting affected in the database table. however when i wrote to a XML file, the record seems to be deleted.
SqlDataAdapter da = new SqlDataAdapter("select * from details", con);
DataSet ds = new DataSet();
da.Fill(ds, "details");
DataRow row = ds.Tables["details"].Rows[0];
if (row["Name"].ToString() == fi.Name)
{
ds.Tables["details"].Rows[0].Delete();
da.Update(ds.Tables["details"]);
}
ds.AcceptChanges();
Can any one help me out with an example(C#) for better understanding.
Thanks in advance..
Suresh.
|
|
|
|
|
|
Hi,
It seems to be you are trying to delete First Row (Rows[0]), Which you don't want. You have to get specific object of that row and then use Delete command. After that you can update by useing DataAdapter to make permenent delete underling Database. Here is a code which might Help.
foreach (Datarow dr in ds.tables[Customer].rows)
{
Dr.delete();
break;
}
da.update(ds);
Hope it will help
Thanks
Ali Zishan
London
|
|
|
|
|
Hi,
Thanks a lot!!! It's working.
Thanks once again,
Suresh kumar palleti,
India.
|
|
|
|
|
I'm try to writing a program use to allow The Phone like a game-handle.
How can I connect PC and WindowsMobile Phone use bluetooth?
Thanks!
|
|
|
|
|
|
Hi
Can anyone please tell me how to restrict the browser to a sigle tab,and prevent the user from opening any new tabs in the same browser.
Is it possible to achieve this from javascript or on the server side ?
Thanks in advance
|
|
|
|
|
Nope. It's not possible to restrict IE7 to a single tab from code running in the browser and definitly not possible to do it from the server side. It IS a setting available to the user of IE7, but changing that setting requires IE7 to be restarted in order for it to take effect.
|
|
|
|
|
Hi Dave,
Thanks for your response i got the point.
My problem is that when the application is opened in multiple tabs in the same browser
it is using the same session id.
Making the session cookieless using the sessionstate attribute in web.config does solve my problem
but the following link
http://msdn.microsoft.com/en-us/library/h6bb9cz9.aspx[^]
says that it is not advisable for ajax enabled applications
what maybe the reason for that or do i have any other work arounds to avoid the browser using the
same sessionid across multiple tabs.
Thanks,
R.Sundar.
|
|
|
|