|
|
C# is installed with the ".NET Framework", download it from windows update or grab a redistributable package around the net or msdn site. Install the framework and you'll have C# language, compiler and other libraries completly installed in your system.
If you install .NET Framework 1.1 then also download the service pack 1.
With these packages you're ready to write software. You'll need an IDE if you don't plan to write software with notepad so download a good IDE like SharpDevelop http://www.icsharpcode.net/OpenSource/SD/Default.aspx[^], it's free.
AFTER you installed the framework & the service pack, if you want offline documentation about the C# language specification, .NET Framework, classes and many others then download and install the .NET Framework SDK, it's very usefull and it has code samples and tools.
A useful tip: If you plan to use notepad to write code then add the path of the C# compiler to the system variables. So at compile time you can type at the console "csc" and not the whole path to the compiler. Notepad is useful if you want to learn in deep the theorical C# specifications cause the times you need to look at the documentation is longer than "drawing" software with an automated IDE, this way you memorise namespaces, find new interesting info and see how things work.
Hope it helps you,
Heinz
-- modified at 14:35 Friday 23rd September, 2005
|
|
|
|
|
i am a novice to c# programming. working on a mini project.
the problem:
have a hidden textbox,2 visible text boxes,2 cal controls,submit button
txtCurDate-hidden
txtStartDate,txtEndDate-visible
validation summary
on page load i made the calendars invisible,validation summary-disabled,disabled clientscript
we have two image buttons and in the click event of hese two i placed the code
set the calendar ctrl visible property true
i also have a validation summary control
on click of submit button the validation has to take place, i enabled the validationsummary,enabled clientscript property of validation summary.
the validation with validation summary being shown is taking place but the control is lost.no other buttons are working once i press submit.
can u tell me how to get the control back to the page after the validation summary takes place on click of the submit button?
this is a part of our project.
jyothipradeep_satyamcorporation
|
|
|
|
|
|
//textboxes:txtStartDate,txtCurDate,txtEndDate
//ImageButtons:2(one for start date,oth end date)
//Calendar Controls:2(corr to each image button)
//Compare validators:2
//cmpv1:start date>current date
//cmpv2:end date>start date
//made displays of cmpvs none
//used validation summary
//the pbm i mentioned at the end
private void Page_Load(object sender, System.EventArgs e)
{ txtCurDate.Text=System.DateTime.Now.ToShortDateString();
Calendar1.Visible=false;
Calendar2.Visible=false;
}
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Button2.Click += new System.EventHandler(this.Button2_Click);
this.Calendar1.SelectionChanged += new System.EventHandler(this.Calendar1_SelectionChanged);
this.Calendar2.SelectionChanged += new System.EventHandler(this.Calendar2_SelectionChanged);
this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);
this.ImageButton2.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton2_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
Calendar1.Visible=true;
}
private void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
Calendar2.Visible=true;
}
private void Calendar2_SelectionChanged(object sender, System.EventArgs e)
{
txtEndDate.Text=Calendar2.SelectedDate.ToShortDateString();
}
private void Calendar1_SelectionChanged(object sender, System.EventArgs e)
{
txtStartDate.Text=Calendar1.SelectedDate.ToShortDateString();
}
private void Button1_Click(object sender, System.EventArgs e)
{
Response.Write("form submitted");
}
private void Button2_Click(object sender, System.EventArgs e)
{
txtCurDate.Text="";
txtStartDate.Text="";
txtEndDate.Text="";
}
// i think this would be more clear
//on validation if it is invalid,all the buttons //won't be working b'coz of validation
//but i want my cal ctrls to be hidden
//and to be displayed on click of a button or //doing sth else
// i know this is agnst the basics but is there any //sol
jyothipradeep
|
|
|
|
|
hi sreejith, if possible give me ur mail id so that i can send u the webform.aspx file itself
jyothipradeep
|
|
|
|
|
pradeep_electro@yahoo.co.in
jyothipradeep
|
|
|
|
|
public can access by all class, internal can access by it's namespace, protected can access by it's inherit class.
How to access a member only by special base class or a class which implement the special interface?
=== Game is power! ===
|
|
|
|
|
Internal code can be accessed only from the same assembly, not namespace.
As far as I know, there's no way to do what you want to. protected is useful if only a derived class can call the method. Otherwise make it public and trust your caller.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
Impliment a containment or Nested class or a Has-a relation.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
how do I iterate through each item in the listbox using the foreach command? I can't figure out the variable name or type for each listbox item. do you have any ideas?
Thanks,
Stephen
|
|
|
|
|
foreach(object oLB in listBox1.Items)
Because a listbox can define the value member of any object to display, it contains objects. Use something more specific assuming that you know what's in there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
This[^] was the second match I got from google.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi to all,
i am using this tutorial on CP to notify real-time of events being logged to syslog and am trying to implement it so the icon of the event being logged appears as the icon for the NotifyIconData() struct, but i cannot figure out how to get a handle to the events icon, and google has not helped me either
can anyone please help ?
kind regards,
g00fy
|
|
|
|
|
I am trying to use some VB code in C# and being very new to databases I can't figure out the following.
Private Sub Connect_Click()
Dim con As ADODB.Connection
Dim recordset As ADODB.recordset
Dim constr As String
Set con = New ADODB.Connection
con.Provider = "ADPProv.ADPProv.1"
constr = "host=" & Host.Text
constr = constr & ";product=" & Product.Text
constr = constr & ";server=" & Server.Text
constr = constr & ";pooling=TRUE"
con.Open constr, "", Password.Text
con.Properties("GROUP") = "ADMIN"
Set recordset = con.Execute("Object",,adCmdTableDirect)
Do Until recordset.EOF
With Output
For Each Field In recordset.Fields
.AddItem Field.Name & "=" & recordset(Field.Name)
Next
.AddItem""
End With
Recordset.MoveNext
Loop
End Sub
Private Sub Data1_Validate(Action as Integer, Save As Integer)
End Sub
I am using:
string constr = string.Format("provider=ADPProv.ADPProv.1;host={0};product={1};server={2};password={3};group=ADMIN;polling=TRUE",
tBox_HostInfo.Text,
tBox_ProductInfo.Text,
tBox_ServerInfo.Text,
tBox_PasswordInfo.Text);
OleDbConnection con = new OleDbConnection();
con.ConnectionString = constr;
I don't know how to reproduce this section of VB code:
con.Properties("GROUP") = "ADMIN"
What is this doing?
Thanks
|
|
|
|
|
Is there any way to cause a DataGridView to lose focus? At the moment, the underlying dataset for a cell is not being updated until I lose focus. I either need to cause the data to be changed while still in focus, or cause the dataset to change focus and auto-save the data?
|
|
|
|
|
try giving focus to some other element at the time you want to lose focus from datagrid.
hope this helps....
- ashish
|
|
|
|
|
please send me the code for editing and updating data in a data grid.in C# ASP.net.
I have used the grid properties given in .net
|
|
|
|
|
I know how to read a text file line by line, open up a StreamReader and sr.ReadLine(), etc.
But is there an easy way to move through a string in memory line by line?
I thought i could "foreach" on the strings characters looking for the \n control character, etc. But its hardly as neat as ReadLine().
So is there a pre-build, neat way of reading an inmemory string line by line?
|
|
|
|
|
Yes.
System.IO.StringReader
---
b { font-weight: normal; }
|
|
|
|
|
The same way would work. Whether a file is persisted on disk or in memory it is what it is - that is, all the bytes are read in as-is unless transcoded (converted from one encoding to another) wile being read-in.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi,
Can anyone explain what I have been experienced here for radio button control?
I dropped three radio button into the form in Windows Application, it will recognize they are in the same group and allow me to check one radio button at a time.
I did the same in the Web application, it will let you check all the radio buttons at the same time.
Also, those nice valisation controls in Web tool box, not in Window at all?
It's bizzare that Microsoft handles their tool in this way.
Thanks
handy
|
|
|
|
|
You can't mix Windows Forms controls and Web Forms controls together like that (although a Winodws Forms control can be embedded into the resultant HTML to be displayed on the client - but not used on the server).
Windows Forms controls are tied to window handles that every control from the desktop and top-level windows to controls like radio buttons. These send messages throughout Windows.
Web Forms controls output HTML to the page to be displayed in the client. They are completely different things.
For Windows Forms, the radio buttons to be checked exlusively as a group must all be in the same container, be that an entire form or a GroupBox .
For Web Forms, the radio buttons must all have the same Name property (which is the name used in the form data).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Heath! It's been long time! Welcome back!
I've been missing your wisdom in the finer points of Win32!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|