|
Hello!
I have a problem. I want to create an Excel document programmatically in C# and then return it as a stream. This works fine if I save the document to disk first and then copy it into a filestream. But I want to copy it directly without saving it to disk first. Anyone who knows how to do this?
Thanks..
|
|
|
|
|
i have to make multilingual pages in asp.net.i made one pg in english and then copied its resource file to make another resource file for urdu.in the Initilize culture method it gives me this exception:
System.NotSupportedException: Culture 'ur' is a neutral culture. It cannot be used in formatting and parsing and therefore cannot be set as the thread's current culture
Any suggestions / ideas would be greatly appreciated.
|
|
|
|
|
I'm not familiar to ASP.NET but i guess the problem is similar to a Standard WindowsApplication.
The cultureInfo is devided in three groups: invariant languages, neutral languages and specific languages.
Invariant languages and neutral languages can not be used as a language in a thread. You always need to define a specific language (in your case it should be "ur-PK").
The three groups of languages are build up like a tree.
invariant--- neutral A -- specific AA
| |-------- specific AB
|
|------ neutral B -- specific BA
|-------- specific BB
In case that the system can not find a "specific AA"-ResX it will fallback to a "neutral A"-ResX. If it doesn't find a "neutral A"-ResX it will fallback to the "invariant"-ResX. The specific languages are like dialects.
Localization is quite a complex theme and should be handled carfully. You can find a lot of articles in the internet and the MSDN. Take your time to read a few of them. --good luck--
greets snowprog
|
|
|
|
|
hi,
i am controls like combobox,date and time picker and radiobuttons..
Now i am saving the values of all controls in the form, through XML file.
and loading those values whenevr that form loads...
whenever I change the values and clicks on k the old values will be overidden..
I want old values and new values too...
Help me pls
With regards
prasad
|
|
|
|
|
If you want to keep a history, you need to set up your XML so that when you save never values, you append the XML instead of overwriting it
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
HI,
can u say how can I append the XMl File..
pls help me
With Regards
prasad
|
|
|
|
|
can any one tell me that how diaplay the files from a selected folder to excel sheet from a list view at run time, i want to count the number of file's of that folder by displaying those fils with there parent folder name in excel sheet, in come object's i have "microsoft excell 9.0" i m getting the excell sheet at run time but i can't diaplay the file's of the selected folder in that i m getting an error message,..... so if anu one can help me in this case he is most welcomed and thanx to the person in advance...
sarvesh rai <sarveshrai_86@hotmail.com>
|
|
|
|
|
Hi all,
i am making a windows based application, here i am using a DataGridView(of C#2.0)
here i wanna add a label control in my GridView,
i have to fill a colomn say(LabeledData) with a Label Control For each row,
hope u got me.
please help me solving this problem
bye byes,
thnx in advance
prashanth
|
|
|
|
|
Hello...
I need a help.
I have a double value like this
39171.5338997917
I want to change it to string but with a format like this
3.91715338997917e+004
What kind of format should I use to format the double value ?
Thanks...
|
|
|
|
|
You could do it like this:
<br />
decimal myValue = 39171.5338997917;<br />
text myRequestedTexy = Convert.ToDouble(myValue).ToString("E");<br />
Hope it helps.
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
Hi!
i am working on a hospital data base. i have two tables Administration and knowlege base.
in Administration i have columns ID, NumberOfDoctors etc, and in KnowlegeBase i have some similar columns but ofcourse differnet data.
Administration
ID Date HospitalName NumberOfDoctors ........
71 4/6/2007 Children Hospital 378 ....
153 4/19/2007 MH 600
207 4/20/2007 Our Hospital 100
227 4/15/2007 My Hospital 30
313 4/11/2007 Hospita 150
576 4/17/2007 Health Ways 80
KnowlegeBase
ID NumberOfDoctors NumberOfBeds AvgPatientPerDoc .........
1 378 1500 20 ...........
I now want to compare and iterate through the rows of Administration.NumberOfDoctors with KnowlegeBase.NumberOfDoctors.. and i dont know how to do it.
Any help.. any ideas.. anythingg....??
(using sql server2005 and c#)
|
|
|
|
|
Hi,
I have a combobox and when i remove all the elements from it, the last element name stays in the area where we can type.
i have tried to force the removal with this code:
<br />
cbProperties.SelectedItem = null;<br />
cbProperties.SelectedValue = "";<br />
cbProperties.SelectedText = "";<br />
But its not working.
Any tips?
Thx,
Nuno
|
|
|
|
|
|
How about setting the DropDownStyle property into DropDownList. That is if you don't need to type anything to the combo box.
Amir Syafrudin
|
|
|
|
|
Perfect!
Thank you very much!
Nuno
|
|
|
|
|
Hi All,
I use repeater in my project (i.e repeater1) , but OnItemCommand event not Occurs repeater_ItemCommand
i see same which uses repeater in this project such event properly work is their are any property to be set to occurs such event
Plz help me
Regard's
Anil
|
|
|
|
|
In your source page do you have the following? (see bolded text)
<asp:Repeater runat=server ID=repeater1 OnItemCommand="repeater1_ItemCommand"></asp:Repeater>
|
|
|
|
|
i have two classes class1 class2 with same functions both are same.
now
class1 c=new class1();
class2 c1=(class1)c;
to avoid an error what i should do....
ok
byebye
thanks
|
|
|
|
|
kalyan_2416 wrote: to avoid an error what i should do....
There are many possible ways to correct the error. However, without knowing more about your classes it would be difficult to say what you need to do.
I think it is more important to find out: What is the relationship between the two classes? How they are to interact with each other? How do you expect them to behave?
Essentially: What is the bigger picture?
|
|
|
|
|
class1
{
void function()
{
}
}
class2
{
void funtion()
{
}
}
static void main()
{
class1 c=new class1()
class2 c1=(class1)c;
}
this is all i know which was asked by my friend...
bye
|
|
|
|
|
kalyan_2416 wrote: this is all i know which was asked by my friend...
Then you might want to get your friend to post here because that does not give enough information.
Your solution might involve using an interface, abstract class, virtual methods or a number of other possibilities. However, without knowing more it would be pointless to try and give an answer.
|
|
|
|
|
FOr this to work at all, class2 needs to derive from class1. It doesn't matter if the functions in both classes are the same, if they have no inheritance relationship, you simply cannot cast them.
class1
{
public void Foo();
}
class2
{
public void Foo();
}
This code does not provide classes that can be cast to each other. There is no relationship.
public class1
{
public void Foo();
}
public class2 : class1
{
}
NOW class2 is of type class1. You can do this:
class2 c = new class2();
class1 c1 = (class1)c;
Note some differences :
1 - I cannot make a class1 into a class2, it is NOT a class2. class2 IS a class1, but it is more than that ( although I have not added any methods, it's automatic ).
2 - There was no need to cast c into a class2, it IS a class2. I am not sure if I needed to cast at all, I did just to be safe.
Another thing: You should really never do this:
class2 c2 = (class2) c;
This can throw exceptions at runtime. Instead, do this:
class2 c2 = c as class2;
This will assign c2 in all instances, if the cast fails, it will assign it as null. So, you add a check for null before you continue, to see if the cast was valid.
if (c2 != null)
{
// cast was valid.
}
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi all,
I have a dataset that gets filled with data from a xml file. That dataset is bound to a datagridview, how can I filter the dataset so that the datagridview only displays the relevant information.
Thanks in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
string strConnectionString, strQueryString;
strConnectionString = "Provider=SQLOLEDB;Data Source=local;" +
"Initial Catalog=Northwind;Trusted_Connection=Yes;";
strQueryString = "SELECT CustomerID, CompanyName, ContactName, " +
"Phone, City, Country FROM Customers";
OleDbDataAdapter daDataAdapter = new OleDbDataAdapter(strQueryString, strConnectionString);
DataTable tblDataTable = new DataTable();
daDataAdapter.Fill(tblDataTable);
DataRow[] foundRows = tblDataTable.Select("Country = 'USA' AND City <> San Francisco'");
foreach (DataRow row in foundRows)
MessageBox.Show(row["CustomerID"].ToString() + " - " + row["ContactName"].ToString()+" - " + row["Country"].ToString());
for more info:
http://www.c-sharpcorner.com/UploadFile/raghavnayak/DataSetsIn.NETP212032005014116AM/DataSetsIn.NETP2.aspx" target="_blank" title="New Window">^]
Gautham
|
|
|
|
|
The dataset gets filled from a xml file. So I use dataset.readXML(string filename)
He who laughs last is a bit on the slow side
|
|
|
|