|
Write IndexChanged Event for country and states dropdown. When you change the country dropdown index get all the associated states from the db and re-bind it to the state dropdown. Similarly when you change the state dropdown get all the related suburbs for that state from the db and re-bind it to suburbs dropdown.
Use valuemember and displaymember, so that it will be easy to fetch from the db.
Regards,
Prakash N
|
|
|
|
|
hi,
i am new to this type of implementation what i need to solve is:
[gevec,geval] = eig(inv(S) * C); (this in matlab, i wish to do it in c#)
where S and c are 2-d matrices i have computed the value for.
Please let me know how can i solve this. Is there any library that can be of help...
Thanks...
|
|
|
|
|
I have no idea what you're trying to do here. You need to break this down into individual functions, and then look for hte C# equivelant. If the [gevec, geval] part is selecting a pixel value, read my image processing articles for details on how to do that in C#.
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.
|
|
|
|
|
Hi if you could please let me know of some library that helps in solving matrices like the inverse of a 2-d matrix.
thanks
|
|
|
|
|
There are matrix classes built in to C#
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.
|
|
|
|
|
foreach (Control control in crystalReportViewer1.Controls)
{
if (control is CrystalDecisions.Windows.Forms.PageView)
{
TabControl tab = (TabControl)((CrystalDecisions.Windows.Forms.PageView)control).Controls[0];
tab.ItemSize = new Size(0, 1); //for delete
tab.TabPages[0].Text = "گزارش";// for rename
tab.SizeMode = TabSizeMode.Fixed;
tab.Appearance = TabAppearance.Buttons;
}
}
|
|
|
|
|
|
Hi people
I was wondering whether anyone knew what button is used in Visual Studio as the "New" button? It looks like a normal button, but with a drop down next to it. I want to use a similar button in my application
Thanks
|
|
|
|
|
that is a menustrip. just look at toolbox -> menus & toolbars.
|
|
|
|
|
Add MenuStrip to your Project, then right click on it and click "Insert Standard Items"
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Sorry guys, I didn't mention that I'm using WPF and MenuStrip is not available then. Didn't want to post this in the WPF forums cuz it seemed more like a general question. Can I maybe add a reference to Windows Forms or something to enable the Menustrip to work in WPF?
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/ms750559.aspx
|
|
|
|
|
I have a VS2005 web project that provides file content download. Since some files are large I want to be able to pause/resume the download. I have added the 'Range' header and byte marker but am getting two problems:
1) File name is getting corrupted with a ',' comma character on the end of the file name (i.e. 'File.zip' shows in the save dialog as 'file.zip,' - could this be a cached file name suggestion?
2) The resume won't fire (possibly due to problem 1)
Environment is IIS6, VS2k5/C#/ASPX.
Have tried with FireFox (3.5.2) and Internet Download manager.
Here's the code - TIA
<br />
if (File.Exists(strFilePath))<br />
{<br />
byte[] buffer = new byte[Int32.Parse(Config.Settings["bufferSize"])];<br />
int length;<br />
long dataToRead, dataLength, bytesDownloaded;<br />
long start = 0;<br />
<br />
string range = Request.Headers["Range"];<br />
if (range != null)<br />
{<br />
range = range.Replace("bytes=", "");<br />
range = range.Substring(0, range.IndexOf("-"));<br />
start = Int64.Parse(range);<br />
}<br />
Response.Expires = 0;<br />
bytesDownloaded = 0;<br />
using (FileStream dlStream = new FileStream(strFilePath, FileMode.Open, FileAccess.Read, FileShare.Read))<br />
{<br />
if (start > 0)<br />
{<br />
dlStream.Seek(start, SeekOrigin.Begin);<br />
dataToRead = dlStream.Length - start;<br />
}<br />
else<br />
{ dataToRead = dlStream.Length; }<br />
dataLength = dataToRead;<br />
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + dlStream.Name.Substring(dlStream.Name.LastIndexOf(@"\") + 1) + "\"");<br />
Response.AddHeader("Content-Length", dlStream.Length.ToString());<br />
length = dlStream.Read(buffer, 0, Int32.Parse(Config.Settings["bufferSize"]));<br />
while (dataToRead > 0)<br />
{<br />
if (Response.IsClientConnected)<br />
{<br />
Response.OutputStream.Write(buffer, 0, length);<br />
bytesDownloaded += length;<br />
Response.Flush();<br />
buffer = new byte[Int32.Parse(Config.Settings["bufferSize"])];<br />
dataToRead -= length;<br />
}<br />
else<br />
{ break; }<br />
}<br />
try <br />
{ dlStream.Close(); }<br />
catch<br />
{<br />
if (dlStream != null)<br />
{<br />
_errors.SendErrorEmail("download.aspx", "failed to close the file stream when user " + objUser.LoginID + " attempted to download " + strFilePath + ".", objUser);<br />
}<br />
}<br />
}<br />
<br /> ;
Thank you for taking the time to look at this
Tom
|
|
|
|
|
TCHamilton wrote: Since some files are large I want to be able to pause/resume the download.
In that case, why not check out the Background Intelligent Transfer Service[^]?
"I do not care if it works on your system, I am not gonna ship your computer."
|
|
|
|
|
Hi Eddy,
I'm not familiar yet with BITS - will explore now. The issue really is how/what's missing in my attempt to facilitate 'resume a paused download...'
Web site is public facing that supports various browsers - I've been asked to make sure it can handle IE6 and Safari primarily, not sure if BITS is relevent in that context. I'm sure the target browser limitation will relax, but first I need to get 'resume' to work.
Tom
|
|
|
|
|
Check this post. This might help.
|
|
|
|
|
Still having problem - unable to set the Response Headers :
Response.AddHeader("Content-Disposition", "attachment; filename=" + Convert.ToString(Server.UrlDecode(Request["FileName"])));
Response.AddHeader("Content-Length", dlStream.Length.ToString());
The system gives message that:
Headers: 'Response.Headers' threw an exception of type 'System.PlatformNotSupportedException'
The system is Win2k3 IIS6. VS2k5
Confused...
Thank you for any help or suggestions
Tom
|
|
|
|
|
Well, mystery solved - response headers were being set, just not obvious with IIS 6, have to track them down via DEBUG/Watch with code that can enum the Custom Header array
((System.Web.HttpResponseHeader)((new System.Collections.ArrayList.ArrayListDebugView(Response._customHeaders)).Items[0])).Name "Accept-Ranges"<br />
((System.Web.HttpResponseHeader)((new System.Collections.ArrayList.ArrayListDebugView(Response._customHeaders)).Items[0])).Value "bytes"
Able to verify Header set, and respond to resume download 'Range'
Thanks all
Tom
|
|
|
|
|
I'm starting a new project and just had a few questions. Please excuse me if these seem trivial, but I have just recently taken on programming in Windows as a career. Although, I know more than enough to be dangerous.
1. This project is set to be complete Feb 1. VS2010 should be out by then. Should I used the beta version now to develop with or use VS2008 and upgrade the project when it comes out?
2. This project is porting our current application written in VB6 to C#. Are there any methods, best practices, or tools that might be helpful or make the transition easier?
3. I'd like to use WPF just because it seems like the new front end for MS, plus I like all new graphical features it brings to the table. I've been hearing a lot about if you're using WPF you should consider MVVM. Is it worth implementing MVVM now or is it something that can be done later? I realize it's always better to do it now, but I don't know much about it (although I have bookmarked Sacha Barber's articles). I don't want to jeopardize the release date for something that will not affect the user or functionality of the machine (it's an automated tooling machine). I've got several user controls that I need to update as well. Some of them are very fancy user input controls. Should this affect my decision?
Thanks for your help and suggestions. I appreciate it.
Brad
Deja Moo - When you feel like you've heard the same bull before.
|
|
|
|
|
BRShroyer wrote: 1. This project is set to be complete Feb 1. VS2010 should be out by then. Should I used the beta version now to develop with or use VS2008 and upgrade the project when it comes out?
Whatever? Compare it to learning a language, you're asking whether you should learn British or American. I'd say that either language empower you in roughly the same way, and the basic tactics will outlast the language itself. Meaning, we still speak in the same way whenever a dictionary changes.
BRShroyer wrote: 2. This project is porting our current application written in VB6 to C#. Are there any methods, best practices, or tools that might be helpful or make the transition easier?
Get the Interop Toolkit[^], and you can replace your VB6-forms one by one with .NET counterparts. There's an example on using the BackgroundWorker in VB6
"If you owe the bank $100, that's your problem. If you owe the bank $100 million, that's the bank's problem."
-- John Paul Getty
|
|
|
|
|
Well you seem to have set yourself (or been set) a goodly challenge!
1. The target date should not be used to decide what tools to use. I would suggest using the most up to date version of VS that is currently available (i.e VS2008) rather than worrying what might be available towards the end of the year. Chances are you need to be productive now, and not worrying about beta software.
2. Not sure of the answer to this one but I expect a Google search will get you to any tools that can do VB to C# conversions. Once you find a tool that works then try to convert the code then go through your compile and test phases; my guess is that that will keep you busy until February.
3. The phrasing of your question suggests that you are not yet a WPF expert. I would not advise trying to convert VB direct to WPF - the learning curve is quite steep. WPF certainly does some wonderful things but you really need to have a very good understanding of how it all fits together to get it right. if you ARE as good as Sacha, Josh or Karl (and all the others) then sure go for it, but if you are a novice then don't try yet. Same answer for MVVM, it's a great pattern, but you really need to understand how it all fits together before trying it on an operational project.
good luck,
Richard
modified on Wednesday, August 26, 2009 9:23 AM
|
|
|
|
|
Hi
we have visual studio 2008 team system.
we're looking for a way to config this product to implement team working and give us a feature to working our developers on the same project (in serevral machines on the network).
would u plz help me how to accomplish this.
thanks
|
|
|
|
|
I am trying to make a program send the email message in a given textbox (here, messageTextBox) when you click on a "Send" button. I cannot seem to get this to work. I am just wondering if someone maybe had some input that would be useful. I am doing this for a website project & have been using my personal emails to test & so far, no luck. Thanks for any & all input!!
protected void sendButton_Click(object sender, EventArgs e)
{
//create mail message
MailMessage mail = new MailMessage();
//set the address
mail.From = new MailAddress("****@yahoo.com");
mail.To.Add("*****@hotmail.com");
//set the content
mail.Subject = "Project email";
mail.Body = messageTextBox.ToString();
//send the message
SmtpClient smtp = new SmtpClient("localhost");
smtp.Credentials = new System.Net.NetworkCredential("****@yahoo.com", "myPassword");
smtp.Host = "mail.yahoo.com";
smtp.Port = 25;
smtp.Send(mail);
}
|
|
|
|
|
Seems the smtp server you are trying to use is not valid.SmtpClient.Host should be a valid smtp server.I suppose yahoo smtp server is smtp.mail.yahoo.com and the port is 465,not 25.So try to modify your code like that:
smtp.Host="smtp.mail.yahoo.com";
smtp.Port=465;
Here is an article how to send email through gmail account.
Life is a stage and we are all actors!
|
|
|
|
|