|
The other two posts suggested the right solution but i would like to add
that u have to design classes for that.
for example to load students directly from your XML file u need two classes
one contains the student properties whose each object represent one student and the other class to hold the collection of these student class objects
|
|
|
|
|
Thank you all, but when i was going throught i find it so confusing. There isn't a simple way. Ya i understood that i need 2 classes and their properties can anyone of you show me some of ur way teaching it or explaining it. I thank you all
|
|
|
|
|
Hi,
i've to send SMS message to a mobile phone from Pc (using C#.net
application)
i dont know which namespaces to include and what requirements i need in
order to full fill this requirement
.. Send messages of up to 160 text characters to any South African
cellular subscriber and many international subscribers as well.
can anybody tell me how can i send messages to mobiles phone through c#.net application.
Thanks
Smitha
modified on Wednesday, December 05, 2007 1:01:52 AM
|
|
|
|
|
Smithakrishnan wrote: i dont know which namespaces to include
Well, you could invent some, I suppose.
Did you try google ? Who is this requirement coming from, do they have any idea if it's possible or not ?
There are webservices that can be used to send SMS, dunno if they work in South Africa. I guarentee that no namespace is going to magically connect you to the mobile phone network, how did you expect it to ?
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 )
|
|
|
|
|
Check out http://www.smscountry.com/[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
hi,
i take one data set using ado.net(sql server 2000),
i take one crystal reporti,that is name is crystalreportTest,
its file path is c:\Test\CrystalReportTest.rpt,my web application in c:\Test,
my dataset name is DataSetTest,i use this dataset in my crystal Report,i take crystalviewer1 &set the report source which is CrystalReportTest.rpt,
following code are used for solve the login problem(in crystalviewer property i remove logon prompt properties)my code is as follows-----
using CrystalDecisions.CrystalReports.Engine.Migration ;
using CrystalDecisions.Shared;
using CrystalDecisions.Shared.Interop;
using System.Data.SqlClient;
using CrystalDecisions.Web;
using CrystalDecisions.Enterprise;
using CrystalDecisions.ReportAppServer;
using CrystalDecisions.Reporting.WebControls;
using CrystalDecisions.ReportSource;
using CrystalDecisions.CrystalReports;
using CrystalDecisions.Web.Services;
public partial class _Default : System.Web.UI.Page
{
TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
CrystalDecisions.CrystalReports.Engine.Database crDatabase;
CrystalDecisions.CrystalReports.Engine.Tables crTables;
CrystalDecisions.CrystalReports.Engine.Table crTable;
CrystalDecisions.CrystalReports.Engine.ReportDocument crReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
protected void Page_Load(object sender, EventArgs e)
{
crConnectionInfo.ServerName = "SERVER";
crConnectionInfo.DatabaseName = "RESERVATION";
crConnectionInfo.UserID = "sa";
crConnectionInfo.Password = "sa";
crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;
crReportDocument.Load(@"C:\Test\CrystalReportTest.rpt");
for (int i = 0; i < crTables.Count; i++)
{
crTable = crTables [i];
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo =crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
crTable.Location = "RESERVATION.dbo." + crTable.Location.Substring(crTable.Location.LastIndexOf(".") + 1);
}
CrystalReportViewer1.ReportSource = crReportDocument ;
}
}
i use ReportDocument because in my application crystal report object is not set,
when run my code it shows Invalid report file path.i don't know what is happinning ,
i have done lot of research on it but i don't findthe right solution,
i don't know what is my mistak,when i run this code ,plz help me anybody
thank you very much for your support
asp.net using c#
modified on Wednesday, December 05, 2007 12:40:11 AM
|
|
|
|
|
Hi
i am working on .NET 2.0 winforms. in my form there is cancel button, in this event i am showing warning message "do u want to save the changes?". I need to show same message on when clicking on wikndow X button?
how can i do...
any sounds greatly appriciated
Ramana
|
|
|
|
|
Check with the form events, it got some events which will fire when a form ends. Somethink like closed, closing etc
|
|
|
|
|
i will write the code in closing event. but if user will clicks on X button, and on No, then how can make window re-active?
Ramana
|
|
|
|
|
There should be a "cancel" property in the event args of the closing-event. If you set this to true the closing will be - well - canceled.
|
|
|
|
|
Hi,
Form.FormClosing event is the prefered one since .NETY 2.0
set FormClosingEventArgs.Cancel true to cancel the close operation.
and maybe FormClosingEventArgs.CloseReason will be useful too.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I need to get data in treeview control from database while using multi threading.
|
|
|
|
|
... and the problem is?
I guess you've got an error while inserting items from another thread.
The sollution is to use the InvokeRequired - property of the treeview to query if you are calling from a different thread and if so using the controls Invoke -function to call a function that handles the actual insertion, here is a sample:
<br />
void FunctionCalledByThread( )<br />
{<br />
if (treeView1.InvokeRequired)<br />
treeView1.Invoke(new InsertItemsDelegate(InsertItems), );<br />
else<br />
InsertItems( )<br />
}<br />
<br />
delegate void InsertItemsDelegate( );<br />
void InsertItems( )<br />
{<br />
<br />
}<br />
|
|
|
|
|
Hello experts,
This is very frustrating, I post a message and near about 10-15 reply from me and and other code project members are their in the post.
But I was unable to find that post...? is any body delete complete post...?
And also when I goto my account and see the message posted (155). When I click on this only top 40 message displayed, When I click on next and previous button the page index and counting of post is also changed but same posts are displayed again and again...?
Where are my other posts...?
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
It was clearly posted in the lounge that posts on Sunday were likely to get lost. They did. The site has been updated, there are some issues, they are being worked on.
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 )
|
|
|
|
|
Christian Graus wrote: It was clearly posted in the lounge that posts on Sunday were likely to get lost. They did.
But look at the implication in his post:
Pankaj - Joshi wrote: And also when I goto my account and see the message posted (155). When I click on this only top 40 message displayed.
He posted 115 messages on Sunday!!
|
|
|
|
|
Hi,
I want to group rows of excel using c#.
how can i do it???
Pls suggest me..
|
|
|
|
|
ApplicationClass excelApplication;
Workbook excelWorkBook;
Worksheet excelWorkSheet;
excelApplication = new ApplicationClass(); excelWorkBook = excelApplication.Workbooks.Add(Type.Missing); excelWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet) excelWorkBook.ActiveSheet; excelWorkSheet.get_Range(excelWorkSheet.Cells[1,1],excelWorkSheet.Cells[1,2]).Merge(Type.Missing); excelWorkSheet.Cells[1,1] = "Merged Text"; excelWorkSheet.get_Range("A1","A1").Interior.ColorIndex = 37; excelWorkSheet.get_Range("A1","A1").Interior.Pattern = XlPattern.xlPatternSolid; excelWorkSheet.get_Range("A1","A1").Font.Bold = true; excelWorkBook.SaveAs("C:\\NewExcel_CSharp.xls",Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing); excelApplication.Quit();
and for that you need
Microsoft.Office.Interop.Excel.dll
|
|
|
|
|
<code>
ApplicationClass excelApplication;
Workbook excelWorkBook;
Worksheet excelWorkSheet;
excelApplication = new ApplicationClass();
excelWorkBook = excelApplication.Workbooks.Add(Type.Missing);
excelWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet) excelWorkBook.ActiveSheet;
excelWorkSheet.get_Range(excelWorkSheet.Cells[1,1],excelWorkSheet.Cells[1,2]).Merge(Type.Missing);
excelWorkSheet.Cells[1,1] = "Merged Text";
excelWorkSheet.get_Range("A1","A1").Interior.ColorIndex = 37;
excelWorkSheet.get_Range("A1","A1").Interior.Pattern = XlPattern.xlPatternSolid;
excelWorkSheet.get_Range("A1","A1").Font.Bold = true;
excelWorkBook.SaveAs("C:\\NewExcel_CSharp.xls",Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing);
excelApplication.Quit();
</code>
and for that you need
Microsoft.Office.Interop.Excel.dll
|
|
|
|
|
hi abhijit,
Thanx for your response.But I am sorry that your code is not resolving my
problem.All i want is to group/ungroup rows(collapse/expand) using c#.
ex: In excel select some rows and go to Data->Group and Outline and select
group.It will collapse rows with mark '+'.This i want through c# code.
|
|
|
|
|
Hello everyone,
I am trying to get the IP Address of the client so the application can hook itself up to it. I am using the following code:
private void MyApplicationForm_Load(object sender, EventArgs e)
{
string strIP = null;
IPHostEntry HosyEntry = Dns.GetHostEntry((Dns.GetHostName()));
if (HosyEntry.AddressList.Length > 0)
{
foreach (IPAddress ip in HosyEntry.AddressList)
{
strIP = ip.ToString();
cmbInterfaces.Items.Add(strIP);
}
}
}
When I run the application on my PC which is connected via a cable to a routher I only get on IP address which is the internal IP address. But when I run the Application on my laptop which is using Wireless Connection to the same routher I get list of few IP addresses. Can someone tell me why this is the case and how can I make sure I only the IP address that my laptop is set to rather than the list of the IP addresses.
Thank you very much and have a great day.
|
|
|
|
|
Hi!
I think you have a basic misconception here:
Any given PC doesn't have "the one IP address", it all depends on the network connections you have.
Worst case: No network at all, so the PC doesn't have an IP address at all.
In all the other cases, each network interface can (and usually will) have a different IP address. Try opening a command shell and executing "ipconfig /all", you'll see the settings and IP addresses for all the network interfaces.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
hi
I don't know how I can give address of specify process
can you help me
regard
|
|
|
|
|
I am creating a simple program that reads and writes files to a database. I have SequetialAccess for reading the data down, it works great, and is very very efficient.
The problem I have is with writing to the database. I can only write the file BLOB in one big, very slow chunk. I want to be able to create a buffer and write in buffered intervals.
Any suggestions.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi i trying to search for values in .txt file and return the existings lines
But how can i trim down the string[] Chunk to -3 letters??
for example:
.txt file look like this
#
k441122
blabla
blabla
blabla
blabla
if i search for k441 than return the k441122 with all the existings lines?
i have tryade Chunk.Substring(0 , 4)
Any idea??
My code look like this:
private bool ReadChunk(StreamReader sr, out string[] Chunk, string MatchData)
{
Chunk = new string[9];
bool FoundMatch = false;
for (int i = 0; i < 9; i++)
{
try
{
Chunk[i] = sr.ReadLine();
if (i == 1 && Chunk[i] == MatchData)
{
FoundMatch = true;
}
}
catch (Exception ex)
{
FoundMatch = false;
}
}
return FoundMatch;
}
Big Tnx!!
|
|
|
|