|
I got it working with axImp.exe Problem = solved.
|
|
|
|
|
Hi,
I'm glad I was able to help.
it seems to imply AxImp.exe lets you choose the name of the output dll,
and it doesnt have to start with AxInterop (for some reason my file did).
|
|
|
|
|
I want to fill a combo with data from a column in a database table, using dataAdapter or dataset not dataReader
|
|
|
|
|
where is the question ?
if the keywords are "combobox" and "dataadapter" maybe you could do a search
on CodeProject...
|
|
|
|
|
comboBox1.DataSource=ds.Tables[0];
comboBox1.DisplayMember="Lifeform"; //ColumnName
also try valuemember property
|
|
|
|
|
Hi,
I found that w3 offers validation service which anyone can access it to validate HTML and make XHTML compliant. Basically, the web service allows the user to validate a fragment of html code - basically copying your html code and validating it, validating the html content by uploading the file and specifying the url for validation.
I was able to hit the webservice for valdiating code fragment. I want to upload file for validation. I am not able to achive that even though I use POST as my request method and use multipart/formdata. Can anyone explain why i am not able to upload the file. Below is the piece of code that i had used.
<br />
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(http:
string boundary = new Guid().ToString().Replace("-", "");<br />
request.ContentType = "multi-part/form-data; boundary=" + boundary;<br />
request.Method = "POST";<br />
BinaryWriter oPostData;<br />
<br />
MemoryStream oPostStream = new MemoryStream();<br />
oPostData = new BinaryWriter(oPostStream);<br />
StreamWriter sw = new StreamWriter(oPostStream);<br />
<br />
byte[] lcFile;<br />
<br />
FileStream loFile = new FileStream(@"C:\testfile.txt", System.IO.FileMode.Open, System.IO.FileAccess.Read);<br />
<br />
lcFile = new byte[loFile.Length];<br />
loFile.Read(lcFile, 0, (int)loFile.Length);<br />
loFile.Close();<br />
<br />
<br />
oPostData.Write(Encoding.GetEncoding(1252).GetBytes(<br />
"--" + boundary + "\r\n" + "&output=soap12" + "&verbose=1" +<br />
"Content-Disposition: form-data; name=\"uploaded_file\" filename=\"" +<br />
new FileInfo("C:\\testfile.txt").Name + "\"\r\n\r\n"));<br />
<br />
oPostData.Write(lcFile);<br />
<br />
oPostData.Write(Encoding.GetEncoding(1252).GetBytes("\r\n"));<br />
<br />
request.ContentLength = oPostStream.Length;<br />
using (Stream s = request .GetRequestStream())<br />
oPostStream.WriteTo(s);<br />
<br />
oPostData.Close();<br />
<br />
Thread.Sleep(1000);<br />
<br />
try<br />
{<br />
HttpWebResponse response = (HttpWebResponse)request.GetResponse();<br />
StreamReader streamReader = new StreamReader(response.GetResponseStream());<br />
string str = streamReader.ReadToEnd();<br />
<br />
Response.Write(str);<br />
}<br />
catch (WebException ex)<br />
{<br />
HttpWebResponse webResoponse = (HttpWebResponse)ex.Response;<br />
Response.Write(webResoponse.StatusCode);<br />
}
Thanks
-Ananth
|
|
|
|
|
Have finished an application having crystal report but 've not been able to present it to my client due to crystal report "Load report failed" error that i get whenever i try to display a report after deployment. I downloaded a merge module but my system could not access it, I got "unable to access merge file" error.
Pls someone help
|
|
|
|
|
I writing a C# app that relies on an Access database for info. I have password protection on the database and have no trouble opening it. However, I want to allow the user to change the password when they so desire. After searching google for awhile, I have found some promising code but It throws the exception: "Cannot change password on a shared open database."
I then seen some code on another forum that said to format the connection string like: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='"strDataSource "';Mode=Share Deny Read|Share Deny Write"
A guy wrote on that foumn and said that when he trys to change the password to a new one, he gets an error saying that the password isn't valid.
What is the proper way in which to change a password?
may your code be error free
|
|
|
|
|
I have figured out how to change the Access DB password through code but there is an confusing error that is occuring. If the password is around 12 chars long, everything is fine but if I have a password that is around 20 chars long, an exception is thrown says that it is an invalid password! I can get in just fine with the exact same (long) password using the MS Access interface so whats the deal?
may your code be error free
|
|
|
|
|
Hi
I need a simple custom event logger to trace and debug my app (in production environment).
I saw an article here in codeproject a few months ago with a tool that read the logs (I think it was a txt file) with a nice custom view but I can't seem to find it...
If anyone knows one I can use please let me know.
Cheers
André da Sila Carrilho
|
|
|
|
|
Hello everyone,
I have a Windows Application which has a series of buttons placed horizantally on the bottom of the Windows Application. It appears that depending on the Client Screen Resolution some of the the buttons are not appearing on the client computer.
I was wondering if there is a way that I can use horizantal scroller to make the entire control visiable and accessable regardless of the screen resolution of the client?
Thank you very much and have a great.
Khoramdin
|
|
|
|
|
Hi,
I havent done this, but I think it would work quite well:
Form.AutoScroll=true;
|
|
|
|
|
Hi,
For a long time that im trying to understand how resume/suspend layout works.
I can't actually see any result of using those calls.
I'm trying to avoid visual glitches caused for example by several repeated insertions in a treeview.
but nothing happened.
i also tried to used this calls when doing rezises to panels in realtime in order to avoid visual glitches as well.
nothing happened...
Can anyone give me a clear idea of how to use those calls?
Thx,
Nuno
|
|
|
|
|
Hi,
try this in the click handler of a button on your form, that has an
empty but visible ListView named lv:
lv.SuspendLayout();
for (int i=0; i<100000; i++) {
lv.Items.Add("item "+i);
}
lv.ResumeLayout();
and try the same without Suspend/ResumeLayout; you wont need a stopwatch
to experience the difference.
|
|
|
|
|
Always great examples Luc!
I really hope you make the MVP next time!
Got my '5'!
All the best,
Martin
|
|
|
|
|
Hello,
i would like to have a windows form combo box populated from an xml file,
here is the format of the xml file
<br />
"<"ITEMS">"<br />
"<"NAME">""<"/"NAME">"<br />
"<"URL">""<"/"URL>"<br />
"<"/"ITEMS">"<br />
i want to take these two items and assign them as variables
NewName;
NewUrl;
which i will then populate the combo box with...
and read them with this code
<br />
<br />
<br />
<br />
<br />
-- modified at 15:46 Monday 9th July, 2007
The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!
|
|
|
|
|
Not sure what you want, but does this help?
XmlDocument doc = new XmlDocument();
doc.Load("XMLFile1.xml");
XmlNodeList names = doc.GetElementsByTagName("NAME");
XmlNodeList urls = doc.GetElementsByTagName("URL");
foreach (XmlNode node in names)
{
Console.WriteLine(node.InnerText);
}
foreach (XmlNode node in urls)
{
Console.WriteLine(node.InnerText);
} Tip: Check the Ignore HTML... option if you're posting XML snippets.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
hey,
thanks for your response,
how can i load the list of names, urls to a combobox based on your code?
thanks again
The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!
|
|
|
|
|
Mate, you already know how to add items to a combobox - you're doing it in your code. Just replace my Console.WriteLine() statements with your code.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
ok,
i'm using this, but the code is only loading one node to my combobox, can someone help me with this?
<br />
XmlDocument doc = new XmlDocument();<br />
doc.Load("ComboItemName.xml");<br />
XmlNodeList Nodes = doc.GetElementsByTagName("NAME");<br />
foreach (XmlNode node in Nodes)<br />
{<br />
NewNameLoad = node.InnerText.ToString();<br />
}<br />
XmlNodeList NodesA = doc.GetElementsByTagName("URL");<br />
foreach (XmlNode node in NodesA)<br />
{<br />
NewUrlLoad = node.InnerText.ToString();<br />
}<br />
comboChannels.Items.Add(new RSSChannel(NewNameLoad, NewUrlLoad));<br />
comboChannels.SelectedIndex = 0;<br />
<br />
-- modified at 13:49 Wednesday 11th July, 2007
The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!
|
|
|
|
|
Hi to all,
I want to program a AGENDA like outlook for my appointments. I want to use drag & drop for modify appointments and make click over a cell and to create a new one. Can anybody help me or guide me?
Thanks a lot.
_______
NaOH
|
|
|
|
|
how about you start programming it and we can guide you from there?
The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!
|
|
|
|
|
Hi velkropie, i want to use de datagridview control to make a personal agenda. It is like Outlook format. To create appointments, drag and drop across the cells, and this new controls (appointments, 'citas' in spanish) can be stored in a database.
I begin with Visual Studio 2005 and the datagridview control.
I need code examples to built this grid, format it and to insert new controls (labels for example) in the grid and a database.
Thanks a lottt.
_______
NaOH
|
|
|
|
|
here is you drag and drop to get you started
void grdCampaigns_MouseDown(object sender, MouseEventArgs e)<br />
{<br />
if (e.Button == MouseButtons.Right)<br />
{<br />
DataGridView.HitTestInfo info = grdCampaigns.HitTest(e.X, e.Y);<br />
if (info.RowIndex >= 0)<br />
{<br />
DataRowView view = (DataRowView)<br />
grdCampaigns.Rows[info.RowIndex].DataBoundItem;<br />
if (view != null)<br />
grdCampaigns.DoDragDrop(view, DragDropEffects.Copy);<br />
}<br />
}<br />
}
void lstCategories_DragEnter(object sender, DragEventArgs e)<br />
{<br />
e.Effect = DragDropEffects.Copy;<br />
}
Collapse
void lstCategories_DragDrop(object sender, DragEventArgs e)<br />
{<br />
if (e.Data.GetDataPresent(typeof(DataRowView)))<br />
{<br />
Point p = lstCategories.PointToClient(new Point(e.X,e.Y));<br />
int index = lstCategories.IndexFromPoint(p);<br />
if (index >= 0)<br />
{<br />
DataRowView category = (DataRowView)lstCategories.Items[index];<br />
DataRowView campaign = (DataRowView)<br />
e.Data.GetData(typeof(DataRowView));<br />
int newID = (int)category[0];<br />
int oldID = (int)campaign[1];<br />
if (oldID != newID)<br />
{<br />
campaign.BeginEdit();<br />
campaign[1] = newID;<br />
campaign.EndEdit();<br />
}<br />
}<br />
}<br />
}
The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!
|
|
|
|
|
I have the following line of code
ResponseProcessingCSP rpCSP = (ResponseProcessingCSP)CSPManager.Instance.GetResponseProcessesingCSP(ChannelID);<br />
GetResponseProcessesingCSP returns an object of type IResponseProcessingCSP
ResponseProcessingCSP inherits from type IResponseProcessingCSP as well.
This throws an error saying "Unable to cast object of type 'ResponseProcessingCSP' to 'ResponseProcessingCSP'
What would be causing this?
|
|
|
|