|
I want to send any URL to any web page that may be printed on webpage and also need to be opened in another new web page.
|
|
|
|
|
Why have you posted the same question 3 times, 1 minute apart ?
If you do this, no one will help you as it is considered very rude.
|
|
|
|
|
I want to send any URL to any webpage that may be printed on webpage and also need to be opened in another new web page
|
|
|
|
|
i want to send any URL to any webpage that may be printed on webpage and need to be opened in another new web page
|
|
|
|
|
Hi
I have written a code to uninstall any application. How can this be made better? I mean if a large amount of code can be replaced by smaller one or any other way to uninstall application. Apart from that I have some more questions which I have put in the code itself as comments. Please help on them as well.
Process oProcess = new Process();
oProcess.StartInfo.FileName = "cmd.exe";
oProcess.StartInfo.CreateNoWindow = true;
oProcess.StartInfo.UseShellExecute = false;
RegistryKey oRegKey = null;
string sUninstallString = "";
string[] asSubKeys = Registry.LocalMachine.OpenSubKey(
@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\").GetSubKeyNames();
foreach (string sSubKey in asSubKeys) {
oRegKey = Registry.LocalMachine.OpenSubKey(
@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + sSubKey);
if (oRegKey.GetValue("Displayname") != null &&
oRegKey.GetValue("Displayname").ToString() == this.treePrograms.SelectedNode.Text) {
sUninstallString = oRegKey.GetValue("Uninstallstring").ToString();
break;
}
}
if (sUninstallString.LastIndexOf("exe") != (sUninstallString.Length - 3)) {
sUninstallString = sUninstallString.Remove(0, 14);
oProcess.StartInfo.Arguments = "/k msiexec.exe /x" + sUninstallString;
}
else {
sUninstallString = sUninstallString.Replace("C:\\", "");
string sExe = sUninstallString.Substring(sUninstallString.LastIndexOf('\\') + 1);
sUninstallString = sUninstallString.Remove(sUninstallString.LastIndexOf('\\'));
oProcess.StartInfo.Arguments = ("/k cd\\ & cd " + sUninstallString + " & " + sExe);
}
oProcess.StartInfo.RedirectStandardError = true;
oProcess.Start();
oProcess.WaitForExit();
oProcess.Close();
oProcess.Dispose();
Also it would be nice if someone can suggest an approach for Add Programs. For me, the major issue would be how to find setups of applications in the system.
Chaos, panic and disorder - my work here is done.
|
|
|
|
|
Hi Guys. Thought I would post this here. I have been struggling getting an export routine to work but had some problems.
1. I wanted to only export data where the Exported Column had a value of 0.
2. When opening the file in Excel I had an error with file format not being the same as file extention.
I have now managed to resolve both issues with some help from the guys in this forumn.
A BIG Thanks to everybody for the help. Below the finished code for the export which can be used by anybody basically.
private void toolStripButton2_Click(object sender, EventArgs e)
{
StreamWriter sw = new StreamWriter(@"C:\file1.csv", false);
DataTable dt = m_dtCC;
int iColCount = dt.Columns.Count;
for (int i = 0; i < iColCount; i++)
{
sw.Write(@"""{0}""", dt.Columns[i]);
if (i < iColCount - 1)
{
sw.Write(",");
}
}
sw.Write(sw.NewLine);
foreach (DataRow dr in dt.Rows)
{
if (dr["Exported"].ToString() == "0")
{
for (int i = 0; i < iColCount; i++)
{
if (!Convert.IsDBNull(dr[i]))
{
sw.Write(@"""{0}""", dr[i].ToString());
}
if (i < iColCount - 1)
{
sw.Write(",");
}
}
sw.Write(sw.NewLine);
}
}
sw.Close();
Live to see another day. (",)
|
|
|
|
|
Hi all ,
I can add images to sql and delete from sql server.I wanna update an image data type from sql server.
For example ;
when i click my button it must be get data from picturebox and change binary from sql.
thanx.
|
|
|
|
|
tr_thorn wrote: I can add images to sql and delete from sql server.I wanna update an image data type from sql server.
Well, if you can add images then surely you can update. It is done the same way but with an UPDATE statement.
Upcoming FREE developer events:
* Developer! Developer! Developer! 6
* Developer Day Scotland
My website
|
|
|
|
|
but i cant.. Can ya give me an example for UPDATE STATEMENT IMAGE Data type ?
|
|
|
|
|
My suggestion for programming....
As lot's of programmer do in the world. Please store relative path of image into the database. And save image in any folder.
Storing images into the database is not a good programming aspect. And this will may increase your database size more and more.
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
i know but i want it
|
|
|
|
|
See following URL's
http://www.codeproject.com/aspnet/PicManager.asp
http://www.codeproject.com/cs/database/ImageSaveInDataBase.asp
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
i know save and retrieve. I WANNA DO UPDATE!!! CHANGE BINARY DATA AND PUT A NEW IMAGE THERE.
|
|
|
|
|
For that I also have to search. But another solution is delete that row and insert new one with updated data till you won't found the solution
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
Gnerally add items just is string or string-arrary.
it is not definitely appoint item's value.
how to add combobox's item use code,
the item's text is string, value is int.
the value is appointed definitely.
|
|
|
|
|
Hi,
u can do like this.
ListItem lt =new ListItem("Test1","1");<br />
DropDownList1.Items.Add(lt);<br />
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
|
Hi,
I am in the process of transferring the data from MSSQl database to MYSQL database.
I went through a code snippet which as in vb, in transferring the data (I mean content of tables).
I got this info from SQL DTS.com (Bulk Export Task) can any one here who did this sort of job earlier using C#?
I downloaded the required dll but wanna to have a code snippet in C#.
If any one knows please help me.
Thank you in advance
Raghavendran.
Raghavendran
|
|
|
|
|
hi all,
I want to handle the event for vertical scrollbar of a listview. instead of displaying the vertical scrollbar, i need to display a button which handles some functionality.
How can i do this?
Please help me with some links or suggestions
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Hi Everybody,
Can any one help me out how to send News Letters through C#,ASp.NET1.1. I have a news letter which is designed in HTML(Containing Graphics). I need to send this page when the user subscribes for the news Letter. can any one please help me out how to achive this...
THANKS IN ADVANCE [ ]
chandu
|
|
|
|
|
The same way you'd send any email, did you try google ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi ,
i am trying to create a application that will send emails on a button click event.I wrote the code and its compiling fine.I am receiving the mail. Now i want to add CC and Bcc options also to this .that is i kept two more text boxes for cc and bcc(txtCC and txtBcc).I want help to code for it.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net.Mail;
using System.Net;
namespace Ttracker_TestApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnSend_Click(object sender, EventArgs e)
{
try
{
MailMessage msgMail = new MailMessage();
msgMail.IsBodyHtml = true;
//msgMail.Bcc.Add(admin);
msgMail.From = new MailAddress("j@tk.com");
msgMail.To.Add(new MailAddress("j@tk.com"));
msgMail.Subject = "Subject";
msgMail.Body = txtMail.Text;
SmtpClient objSmtpClient = new SmtpClient("smtp.asnet.com");
objSmtpClient.Host = "smtp.asnet.com";
objSmtpClient.Credentials = new NetworkCredential("techvendors@asnet.com", "password");
objSmtpClient.Send(msgMail);
}
catch (Exception ex)
{ }
}
}
}
Thanking you
j
-- modified at 1:13 Thursday 22nd November, 2007
|
|
|
|
|
<cdoe>
MailMessage MyMessage = new MailMessage();
MyMessage.Bcc = "mymailid@mail.com";
|
|
|
|
|
Thanks ,that worked
but now i want it to acccept the address thats inside the text boxes txtAddress,txtBcc,txtCC.And also it should accept more than one cc's and bcc's.
and most important the contents of the mail should be taken form the datagrid
How can i do that in my code
Thanks
j
-- modified at 3:09 Thursday 22nd November, 2007
|
|
|
|
|
Hello experts,
Can anybody tell me how many controls I can place on a form....?
I am using windows application using C#.net 2005.
Their is a limitation in VB 6 for 255 maximum controls.
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|