|
Hay, dude, pretty much you enter the wrong field, I really can't image a person, like you, with little c# experience can build a workable system from scratch. Your HR or your manager is a .....
Guess what, don't expect people in here are willing to help you, at least not me.
|
|
|
|
|
If you can't help..then don't reply...keep ur comments to urself
|
|
|
|
|
First of all, you need to learn c# and do some "hello world" ex. Secondly you have to learn SQL to save data fields to Database.
Here is a link to a free C# PDF ebooks
Create few apps where you save data to SQL Server or Access before you start with your first project.
|
|
|
|
|
Blikkies - does the link work - I got an error but it could be my net nazi.
The link reads as an excellent resource for the financially challenged newbies.
|
|
|
|
|
Link works fine, only error i get, is an javascript error. I was surprised of how excellent books they give out for free.
|
|
|
|
|
Yup, my very own net nazi stops this at work. Thanks
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thanks..SQL part is already done..only part is C#..but the ebooks are really helpful
|
|
|
|
|
Dear All,
I've written a program that contain 2 parts, I have a UI project (Project_1), which is a WinForm, and dll project (Project_2), which handles the db access. Now in my dll project, I had DbConnectionString settings and it automatically added into app.config (dll project) file. There is another app.config file in UI project.
When I deploy my application into a test machine, I tried to change the DbConnectionString in both Project_1.exe.config and Project_2.dll.config, but the applicatiion doesn't connect to the test database, rather it connects to the database when I was used during developing stage, which is setting that I had in Properties.Settings.settings of the dll project.
Now what I really need is that I would like the application connects to any database that i specified in the DbConnectionString either in Project_1.exe.config or Project_2.dll.config. I am using OleDbConnection object.
Here is the code to get the DbConnectionString: OleDbConnection conn = new OleDbConnection(Properties.Settings.Default.DBConnectionString);
Here is the config file for dll project:
<configuration><configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="CodistriCore.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<CodistriCore.Properties.Settings>
<setting name="AttachmentRootFolder" serializeAs="String">
<value>S:\Clients\Codistri\Attachments</value>
</setting>
<setting name="DBConnectionString" serializeAs="String">
<value>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Clients\Codistri\CoRE.mdb</value>
</setting>
</CodistriCore.Properties.Settings>
</applicationSettings>
</configuration>
Here is the config file for WinForm project:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Codistri.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings />
<applicationSettings>
<Codistri.Properties.Settings>
<setting name="AttachmentRootFolder" serializeAs="String">
<value>S:\Clients\Codistri\Attachments</value>
</setting>
<setting name="DBConnectionString" serializeAs="String">
<value>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=S:\Clients\Codistri\CoRE.mdb</value>
</setting>
</Codistri.Properties.Settings>
</applicationSettings>
</configuration>
Any help will be much appreciated.
Andie
|
|
|
|
|
I think you need to include part of your DLL config file into the config file of your WinForm project. Try adding the line
<section name="CodistriCore.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> within the sectionGroup tags of the WinForm config so it looks like this: (I won't type the entire tag contents here)
<configSections>
<sectionGroup name="applicationSettings"... />
<section name="Codistri.Properties.Settings"... />
<section name="CodistriCore.Properties.Settings"... />
</sectionGroup>
</configSections>
Then you have to copy this part of your DLL config file:
<CodistriCore.Properties.Settings>
<setting name="AttachmentRootFolder" serializeAs="String">
<value>S:\Clients\Codistri\Attachments</value>
</setting>
<setting name="DBConnectionString" serializeAs="String">
<value>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Clients\Codistri\CoRE.mdb</value>
</setting>
</CodistriCore.Properties.Settings>
to your WinForm config file and place it within the applicationSettings tags:
<applicationSettings>
<Codistri.Properties.Settings>
<setting name="AttachmentRootFolder" serializeAs="String">
<value>S:\Clients\Codistri\Attachments</value>
</setting>
<setting name="DBConnectionString" serializeAs="String">
<value>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=S:\Clients\Codistri\CoRE.mdb</value>
</setting>
</Codistri.Properties.Settings>
<CodistriCore.Properties.Settings>
<setting name="AttachmentRootFolder" serializeAs="String">
<value>S:\Clients\Codistri\Attachments</value>
</setting>
<setting name="DBConnectionString" serializeAs="String">
<value>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Clients\Codistri\CoRE.mdb</value>
</setting>
</CodistriCore.Properties.Settings>
</applicationSettings>
I haven't done this in a while myself so I hope I got it right. This should get you started anyway. Good Luck!
|
|
|
|
|
Thanks a lot mate, this is what i exactly did, but from the dll project, I still can't access to the exe project's config file, e.g. simplly the Codistri namespace is there, but the Properties is not accessable, in otherwords, this statement will cause the exception: Codistri.Properties.Settings.Default.DBConnectionString
|
|
|
|
|
It's been solved, I need to create a Configuration class in dll project with ConnectionString property, then initialise the ConnectionString in .exe class, and passed it back to the dll class.
Thanks for your guys hlep anyway
|
|
|
|
|
Good thing it works! ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
I am using C#.net to display the website (Example: "www.yahoo.com/login") in the form (using axWebBrowser). When I enter a string in a text box and click a button, I am trying to display the string in the "Yahoo ID" field on the website displayed on the form. Is it possible? If so, how can this be done? I am new to C#.net and will appreciate any of your help.
Thank you.
|
|
|
|
|
Parse the Document Html to get the Id.
simple.
|
|
|
|
|
Use the web browser control comes with .net. Here is a sample code to give you some idea.
webBrowser1.Document.GetElementById("fieldname").SetAttribute("value", "foo");
webBrowser1.Document.GetElementById("button").InvokeMember("click");
|
|
|
|
|
Thank you for your replies. I will try that and update. I appreciate your time.
|
|
|
|
|
Thank you Abhisekh and Tamer.
Tamer, your solution worked like magic. ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Hi, I'm currently stuck at my assignment where I need to create new buttons by naming it and also able to delete it after right clicking on it, choosing "delete" from the contextMenu
Here's my code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace New_One
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_MouseDown(object sender, MouseEventArgs e)
{
Point p = new Point(e.X, e.Y);
if (e.Button == MouseButtons.Right)
{
contextMenuStrip1.Show(button1, p);
}
}
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
button1.Dispose();
}
private void bt_add_Click(object sender, EventArgs e)
{
Button newButton = new Button();
newButton.Name = tb_name.Name;
newButton.Text = tb_name.Text;
flowLayoutPanel1.Controls.Add(newButton);
newButton.MouseDown += new MouseEventHandler(newButton_MouseDown);
}
void newButton_MouseDown(object sender, MouseEventArgs e)
{
Point p = new Point(e.X, e.Y);
if (e.Button == MouseButtons.Right)
{
}
}
}
}
|
|
|
|
|
jyjt_code wrote: Button newButton = new Button();
Tis button exists in your controls collection, but that's all. So, either create another collection that you can use to delete them from, or put tags on them so you can search your controls collection and find them.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: So, either create another collection that you can use to delete them from, or put tags on them so you can search your controls collection and find them.
Erm, sorry to trouble you again. But i do i go about doing it?
|
|
|
|
|
Well, you do one of the two things I said
1 - create a member variable that is a list of controls, or buttons, depending on if buttons are the only control you create. Then you can find them in there and remove accordingly
2 - create a tag to identify your controls, and set the Tag property of Buttons you create. Then you can iterate over the built in controls collection and check the tags to see which are controls that you created.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello,
I am trying to make a browser using C# express, that will
support my web based game. I'm making it without a textbox.
I want about 10 buttons on the left side of the form, that
when clicked, tells the browser (located on the right side
of the form) which page to navigate to.
For instance:
[Gunsbutton] code: webBrowser1.Navigate(go to url http://www.mygame.com/guns.php);
[Armorbutton] code: webBrowser1.Navigate(go to url http://www.mygame.com/armor.php);
[Energybutton] code: webBrowser1.Navigate(go to url http://www.mygame.com/energy.php);
I'm just a beginner still, and I have looked everywhere
for what I think, should be a pretty simple code. But I
can't find it. Any help would be appreciated, I'm stuck. ![Confused | :confused:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_confused.gif)
|
|
|
|
|
You've pretty much got it...
webBrowser1.Navigate(new Uri("http://www.mygame.com/energy.php"));
EDIT: Oh, and if you're just using WinForms (As opposed to WPF), you don't even need the Uri... Just webBrowser1.Navigate("http://www.mygame.com/energy.php");
Or are you having trouble hooking the buttons up to the event? You should be able to just double-click each button in the designer, and Visual Studio will automatically create an event handler and show you where to start writing the code.
modified on Wednesday, September 30, 2009 3:33 PM
|
|
|
|
|
Thanks, it works with no errors.
I tried both of those but it wouldn't work before.
Must have been my ISP giving me troubles.
|
|
|
|
|
Hi
I am building a named pipe service using wcf using the example given in http://www.omegacoder.com/?p=101 but I am unable in Visual Studio 2008 to be able separately execute the windows form and then the console application.
Can someone explain to me how it is possible to start separately a number of projects in a solution in Visual Studio 2008? I have tried multi starts in Visual Studio, but this does not work.
Thanks
|
|
|
|