|
hi
why you write the text line by line?
using(StreamWriter sw = new StreamWriter(filename))
{
sw.Write(textbox.Text);
}
regards
|
|
|
|
|
Thanks,
It's working great...
|
|
|
|
|
Hi,
I'm after some suggestions on best practice to resolve an issue of loading large data combobox's (WPF).
I have two combo's Country & Airport. Country combo is to filter Airport combo (with just Airports in that Country) simple...
There are approx 260 Countries and 10,000+ airports worldwide
Using MVVM
public viewmodelFlights()
{
CountryList = new List<CountryModel>(wcfService.GetCountries());
AirportList = new List<AirportModel>(wcfService.GetAirports());
icCountryView = CollectionViewSource.GetDefaultView(CountryList );
icCountryView.CurrentChanged += new EventHandler(icCountryView_CurrentChanged);
icCountryView.MoveCurrentToPosition(-1);
icAirportView = CollectionViewSource.GetDefaultView(AirportList );
icAirportView.CurrentChanged += new EventHandler(icAirportView_CurrentChanged);
icAirportView.MoveCurrentToPosition(-1);
} just so you get the vm idea
I'm trying to get this initial loading quicker. Is there anyway to only load the airports once the Country has been selected?
I have a bigger problem with a hospital list which has 1,000,000+ records!!
|
|
|
|
|
Hi,
kindly let me know, How may I send "TAB" key aur "SHIFT+TAB" key
using SendKey method?
(Riaz)
|
|
|
|
|
Try SendKeys.Send("+{TAB}");
|
|
|
|
|
|
Hello.
Unfortunatally I am new to c#. Ich have written a class, that derives TabPage. Unfortunatally it's OnGotFocus Method does not react, when the Tab gets the Focus. What I do wrong?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
class MontlyTab : TabPage
{
[...]
protected override void OnGotFocus(EventArgs e)
{
base.OnGotFocus(e);
}
[...]
}
}
Thank you for help!
How do you know, that Tagamoga has been assimilated by the borg?
"Recistunce ist fiutille."
Sorry for violating the english language.
|
|
|
|
|
Try OnEnter and OnLeave events.
|
|
|
|
|
*giving a big hug* THANK YOU, it works!
How do you know, that Tagamoga has been assimilated by the borg?
"Recistunce ist fiutille."
Sorry for violating the english language.
|
|
|
|
|
you're welcome
|
|
|
|
|
hi all
i am just beginner in c# and i want to make a PhoneBook project by using ADO.Net.. and i use SQL Server 2005 Express Edition for my database
but i have a problem while connecting database..in the error it says:
"Cannot database "Kisiler" requested by the login.The login failed.The login failed for user 'Computer\SQLEXPRESS'"
my connection string is like that :
SqlConnection con = new SqlConnection("Data source=COMPUTER\\SQLEXPRESS;initial catalog=Kisiler;integrated security=True");
i checked services after that error..everything looks running when i looked at SQL Server Configuration manager
what should i do now ?
|
|
|
|
|
SqlConnection con = new SqlConnection("Data source=COMPUTER\\SQLEXPRESS;initial catalog=Kisiler;integrated security=True; User id=sa; Password=123456");
Use this. but do remember to type ur userid and password
Regards
Lalit Manik
|
|
|
|
|
thanks for the reply friend
i tried the string u wrote but still i get same error
and i didnt use any password while i was creating my table...i mean i use 'Windows Authentication' mode
u have any else suggesstion ?
|
|
|
|
|
Problem is with connection string.
User name and password credentials are missing there....
|
|
|
|
|
When connecting to a database with Integrated Security set to true, I don't think you need to specify User ID and Password.
|
|
|
|
|
Try changing the Data Source to
Data Source=.\\SQLEXPRESS (Assuming you're using the default instance.)
You can also check out connectionstrings.com[^]
Hope this helps =)
|
|
|
|
|
hi
i checked the site
but as i see my connection string is the same in the site
i give permission that user to use the database but still i have error
|
|
|
|
|
Which OS do you use by the way
|
|
|
|
|
|
Try "Integrated Security=false" and the above code i have given...
i Hope it will work
Regards
Lalit Manik
|
|
|
|
|
Temme 1 thing, the account from which u logged in to Ur computer have rights to access the SQl?
|
|
|
|
|
yeah i have given permission to that user
but still it says it doesnt have to reach the db
|
|
|
|
|
Is database server running on your local machine ?
|
|
|
|
|
yeah it works man
do you think it happens becuase of installation or some another options ??
|
|
|
|
|
Dear Friends,
i have small problem
can U please tell where do i make mistake?
i am converting string value "0000000000000001" to byte array
then again i am converting back byte array to string
the out put is like these "0000000010000000"
private void button14_Click(object sender, EventArgs e)
{
//i am converting string value "0000000000000001" to byte array
string sVall = "0000000000000001";
byte[] bVal =convertBinaryToByte(sVall, 8);
//then again i am converting back byte array to string
BitArray objBitA = new BitArray(bVal);
MessageBox.Show(converBitArrayTostring(objBitA));
}
private string converBitArrayTostring(BitArray objBit)
{
try
{
string sReturnValue = "";
for (int i = 0; i < objBit.Length; i++)
{
sReturnValue += (objBit[i]) ? "1" : "0";
}
return sReturnValue;
}
catch
{
return "";
}
}
private byte[] convertBinaryToByte(string binary, int bitsPerByte)
{
try
{
List<byte> list = new List<byte>();
for (int i = 0; i < binary.Length; i += bitsPerByte)
{
string t = binary.Substring(i, bitsPerByte);
//list.Add(Convert.ToByte(t, 2));
list.Add(Convert.ToByte(t));
}
return list.ToArray();
}
catch
{
return new byte[0];
}
}
please point out my mistake..
is there any othere better method to do this?
help me
by
joe
|
|
|
|