|
MidwestLimey wrote: future bug
You mean job security?
|
|
|
|
|
A) Formatting isn't important in an XML document.
B) What's happening to your formatting that you don't like?
|
|
|
|
|
Dear All,
Is there any way that i could tell windows launch my application as a different user, ofcosue this can be achieved by right-clicking on it. IS there any way that I can do it programatically.
Thank you!
M. Nauman Yousuf
"Mess with the Best, Die like the rest"
|
|
|
|
|
|
Thx Ravi,
i hv started working on this lead
"Mess with the Best, Die like the rest"
|
|
|
|
|
Basically I want to do something like this:
Code:
on the .aspx page
setHorizontalLabels([<%# Function %>]);
"Function" being a function in my .aspx.cs that returns an array
I just can't seem to get my <% %> to be recognized within the script tag.
Any thoughts?
-----------------------------------------------------------
Completion Deadline: two days before the day after tomorrow
|
|
|
|
|
jgasm wrote: Basically I want to do something like this:
You cant always get what you want,
But if you try sometime, yeah,
You just might find you get what you need!
Also try posting in a "web development forum" like ASP.NET or something
|
|
|
|
|
Looking to automate business process in form of xml tags(like IO,Registry,ACL operations etc) and writing a C# wrapper to execute the same.
Is there any project or library available, so that i dont have to re-invent the wheel.
Thanks!
h.
|
|
|
|
|
Have you looked at the Windows Workflow in the 3.0 framework?
Michael
|
|
|
|
|
Oh my my, we are still upgrading to .Net 2
|
|
|
|
|
I want to Download a File from RapidShare using this Code
try<br />
{<br />
string destFileName = _DirectoryPath + "\\" + FileName;<br />
destFileName = destFileName.Replace("/", " ").Replace("%20", " ");<br />
<br />
if (File.Exists(destFileName) == false)<br />
{<br />
IWebProxy proxy = null;<br />
if (ProxyUri != null && ProxyUri != string.Empty)<br />
{<br />
proxy = new WebProxy(ProxyUri, true);<br />
proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;<br />
}<br />
<br />
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(_DocumentUrl);<br />
if (proxy != null)<br />
{<br />
request.Proxy = proxy;<br />
}<br />
HttpWebResponse response = (HttpWebResponse)request.GetResponse();<br />
stream = response.GetResponseStream();<br />
<br />
byte[] inBuffer = ReadFully(stream, 32768);<br />
<br />
fstream = new FileStream (destFileName, FileMode.OpenOrCreate, FileAccess.Write);<br />
fstream.Write(inBuffer, 0, inBuffer.Length);<br />
<br />
<br />
fstream.Close();<br />
stream.Close(); <br />
}<br />
_IsDownloadSuccessful = true;<br />
_IsDownloading = false;<br />
<br />
DownloadCompleted(this, _IsDownloadSuccessful);<br />
}<br />
catch
standard Downloads like "http://www.web.com/file.zip" works fine.
Downloads like "http://rs125dt.rapidshare.com/files/41109314/dl/Sega_PSP_Emu.rar" quit after 6kb (login at rapidshare is already done)
Is there a way to fix this?
|
|
|
|
|
|
|
I', trying to download a rapidshare file using a premium account but I'm stuck.
My Download() Method:
private void Download()
{
using (WebClient wcDownload = new WebClient())
{
try
{
webRequest = (HttpWebRequest)WebRequest.Create(txtUrl.Text);
webRequest.PreAuthenticate = true;
//**QUESTION:**I'm not very sure if I should use NetworkCredential to authenticate myself.
NetworkCredential networkCredential = new NetworkCredential("username", "password", "rapidshare.com");
webRequest.Credentials = networkCredential;
webResponse = (HttpWebResponse)webRequest.GetResponse();
// Open the URL for download
strResponse = wcDownload.OpenRead(txtUrl.Text);
// Create a new file stream where we will be saving the data (local drive)
strLocal = new FileStream(txtPath.Text, FileMode.Create, FileAccess.Write, FileShare.None);
// It will store the current number of bytes we retrieved from the server
int bytesSize = 0;
// A buffer for storing and writing the data retrieved from the server
byte[] downBuffer = new byte[2048];
// Loop through the buffer until the buffer is empty
while ((bytesSize = strResponse.Read(downBuffer, 0, downBuffer.Length)) > 0)
{
// Write the data from the buffer to the local hard drive
strLocal.Write(downBuffer, 0, bytesSize);
}
}
finally
{
// close the streams when job done
strResponse.Close();
strLocal.Close();
}
}
}
**QUESTION:**I'm not very sure if I should use NetworkCredential to authenticate myself.
Any ideas if authentication should be done via Cookie? If yes, how? HttpCookie?
Thanks.
|
|
|
|
|
With other programs like "Internet Download Manager" it works
|
|
|
|
|
|
I do test it tanks 4 the tip
|
|
|
|
|
Greetings all,
I was hoping to glean some advice from some of you pros out there. I am currently enrolled in an application developer program with New Horizons and I have very little actual programming experience other than HTML. By the time I'm done with all of the courses I will have taken 5 exams which I guess will give me the MCTS cert. The exams they have listed that I will take are:
70-536 = Dot Net Framework 2.0 Foundation
70-528 = Dot Net Framework 2.0 Web Applications
70-526 = Dot Net Framework 2.0 Windows Applications
70-529 = Dot Net Distributed Applications
70-431 = SQL 2005 Certification
They are pretty much using all of the official Microsoft materials to teach the information. I checked out the Microsoft Certifications site and all of the materials that they have listed that you should have to prepare for each exam is pretty much what I have been given at NH. I'm currently starting MS-5160 Core Development with .Net Framework 2.0 today.
So here is my question:
First, I'm finishing up 2609A Introduction to C# and while I pretty much understand the basics of the language and the concepts behind it, I couldn't just sit down and start writing code. The Prerequisite for starting MS-5160 is a year of actual programming under your belt. Do I need to be proficient in at least being able to write C# code before I move on to more in depth studies? Also, what is the best way to actually get the practice of coding. It seems like there is a lot of material out there that teaches the concepts, but not near enough real life application practices where you go in an actually code productive solutions.
Any comments or suggestions?
|
|
|
|
|
I'm also busy doing the exams listed above. I have about 5 years of C# experience now, which I think is plenty, but loads of peeps here will have lots and lots of experience. The first exam, the Framework foundation is basicly explaining pretty much diffrences between the 1.1 and 2.0 framework. The exam is pretty simple in my opinion. However the technology specialist exams do require some sort of experience (TS exams are Web, Win & Distro).
I'f you're already a little into C#, I recommend fooling around a lot. Set yourself a goal like creating an app which communicates with a SQL Server, also try other databases but become familiar with talking to databases. I bought the book MS .NET Framework 2.0 Application Development Foundation (ISBN-13 : 978-0-7356-2277-7) to prepare for the 70-536 exam. You'll be able to pass that exam pretty easy. After you've done that you should have a pretty good foundation to get more and more familiar with the code. The best way to do that, is do the coding. Set yourself a goal, develop a project plan and code. Ofcourse you'll run into problems, but that's why codeproject is here
|
|
|
|
|
"I recommend fooling around a lot" - Eduard Keiholz in the C# forum
|
|
|
|
|
For C# experience, I'd suggest downloading a few of the great articles (source samples) right from this site (pick some that you're familiar with in everyday life). Run the demos to see how it works, then set up a debug session and learn from the code. Once you've done that, pick a target (for example a name/address lookup app) and code it, using the other source as reference. Syntax is easy. Designing using OO concepts is a bit tougher to do correctly.
Hopefully mistakes will become apparent and all of it will give you a better understanding.
My other suggestion would be to do a google on C# skills tests.
Good luck to you!
|
|
|
|
|
No matter how much you read, doing the stuff is the best. Assuming that you have Visual Studio on a machine, you could go to Coding4Fun and look at some of the coding examples. Some of the authors do a very good job explaining what to do and why. It can also give you that boost to go from 'okay...what must I do to write code' to 'okay...what can I code next'.
Over time you'll start to have questions like when do I create a class library, why would I want to overload a method, and stuff like that.
Regardless of what level you are at, if you try something and fail or something goes over your head, we are here to help.
|
|
|
|
|
Hi everybody,
Im creating a c# windows application in framework 2.0,i had created textbox dynamically so that i want to produce tree view structure as the no of textbox i created.I Need only one root node.
The structure is
TextBox
|
|_TextBox1
|_TextBox2
|_TextBox3....
But Im getting the tree structure as
TextBox
|
|_TextBox1
TextBox
|
|_TextBox2
TextBox
|
|_TextBox3
The Code i used is below
int n = 25;
int m = 1;
private void BtnAddControl_Click(object sender, EventArgs e)
{
TextBox txtBox = new TextBox();
txtBox.Text = "TextBox" + m;
txtBox.TabIndex=m;
txtBox.Tag=m;
txtBox.Location = new System.Drawing.Point(10, n);
txtBox.Size = new System.Drawing.Size(70, 20);
txtBox.Name = "TextBox" + m;
txtBox.Click +=new EventHandler(txtBox_Click);
this.Controls.Add(txtBox);
TreeNode root = new TreeNode("TextBox");
root.Nodes.Add(txtBox.Name);
TV.Nodes.Add(root); //TV Treeview name
TV.ExpandAll();
n = n + 20;
m++;
}
How should i accomplish this..
Kanna
|
|
|
|
|
Dotnetkanna wrote: n = n + 20;
m++;
Anyway, try like this...
<code>TreeNode parentNode = new TreeNode();
parentNode.Text = "Whatever";
mainTreeView.Nodes.Add(parentNode);
for(int count = 0; count < 10; count++)
{
parentNode.Nodes.Add(count.ToString());
} </code>
|
|
|
|
|
Hi Kanna.
The reason is because you are creating a new node every time the button is clicked and adding that newly created node to the root level of the Tree itself. I would suggest creating the parent node as a member level variable and then add your new TreeNodes to that parent node rather than to the TreeView.
|
|
|
|