|
FYI every Control has a Tag property (type: object), so you can store one reference there
to whatever you like. One ComboBox could point to another ComboBox, to an ArrayList, whatever.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I would always assume that sender is the control instance that "fired" the event. The form is the one receiving the event. I use the word "assume", because it's really up to the person who coded the control. For the .Net framework controls, I have never seen an instance were sender was not the associated control. If there is then it would probably be considered a bug.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
How to extract html code any web site using C#.Net
I mean : http://www.yahoo.com----in that site find the Urls,Emailid,phone
Pls give code
Reddy
|
|
|
|
|
Grabbing the HTML is easy, the rest probably involves regular expressions to parse the string that contains the page.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
allivelu wrote: How to extract html code any web site using C#.Net
I mean : http://www.yahoo.com----in that site find the Urls,Emailid,phone
I'm not sure exactly what you want. If you are looking to get the HTML for a webpage, load it in a WebBrowser object and use the DocumentText property to retrieve the HTML as a string.
If you are looking for the URLs, email, and phone numbers, you'll need to look at the string you got from calling browser.DocumentText for substrings that match the pattern of a URL, email address or phone number. The Regex class is what you might want to look at, since that is *really* helpful at doing pattern matching.
Good Luck!
It isn't enough to do well in life.
One must do good when and where one can.
Otherwise, what's the point?
|
|
|
|
|
i want to make something like windows simulation question ??????
if any one have any idea about creating this, Please reply quickly
many thanks
omer
|
|
|
|
|
What do you want to do exactly?
And we all try to do our best, you cannot ask, please reply quickly.
|
|
|
|
|
Your question makes no sense.
What does 'windows simulation question' mean?
Paul Marfleet
|
|
|
|
|
Maybe he wants to simulate questions asked by Windows?? Not sure which ones! Would you like to save before closing maybe?
Paul
|
|
|
|
|
I think that even we answered quickly and now we have to wait for him...
What are we simulating here? The lounge discussion board? :->
|
|
|
|
|
So sorry for being late
i have a problem with internet connection
i want to make some thing like simulation questions in the microsoft certicates
thanks so much and sorry for being late
Best wishes
omer
|
|
|
|
|
Your question still makes no sense. What do you mean by simulation questions?
|
|
|
|
|
I think I see. Are you looking to create a system which poses questions in the same way that the Microsoft exams are run? If so, you are going to need to have a database with questions and answers in them.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Sorry that my question was not understood
????
do any one know about the MCSE Questions
there are practise questions called Simulation questions????
in this type of question the student sees some thing like the actual windows interface and he can interact with it as if it is a real operating system
??????????
i want to do some thing like this
???????????
Sorry for second time
i hope it is clear now
thanks!!!!!!!!!!!!!!!
omer
|
|
|
|
|
Bitmap BMP = new Bitmap(60, 32);
Graphics g;
g = Graphics.FromImage(BMP);
g.DrawString("abcdef", font, Brushes.Red, new PointF());
MemoryStream mem = new MemoryStream();
BMP.Save(mem,ImageFormat.Bmp);
Byte[] B = mem.ToArray();
size of B should be 60*32/8
but i got the size is 7734
can i get exact size pls
|
|
|
|
|
JABIR E wrote: size of B should be 60*32/8
No, it shouldn't. It should be 54+60*4*32, which it is.
Each pixel uses four bytes, not a single bit.
The bmp file format is not a raw data file, it is an image file format that has a header (in this case 54 bytes), followed by the image data.
---
single minded; short sighted; long gone;
|
|
|
|
|
So i have this method, that accepts data inputs of various types from a web form...now some of them (if not all) can be left empty...and thus insert nothing. now my coding is not allowing it to accept these empty strings, any ideas?
This is the coding i am using at the moment;
protected void Submit_OnClick(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
vesselLicense.InsertVslLic1(Convert.ToDateTime(txtRegistrationDate.Text), Convert.ToInt32(txtMartimeRegistrationNumber.Text), txtVesselName.Text, <br />
Convert.ToInt32(ddlVesselCategory.SelectedValue),rblOperativeStatus.SelectedValue, Convert.ToInt32(ddlBasePort.SelectedValue), <br />
txtRemarks.Text, txtPreviousAuthorisation.Text, Convert.ToDouble(txtOverallLenght.Text),Convert.ToDouble(txtWidth.Text), <br />
Convert.ToDouble(txtHeight.Text), txtConstructionPlace.Text, txtCountry.Text, Convert.ToInt32(txtContructionYear.Text), txtShipyard.Text, <br />
txtHullMaterial.Text,txtStructuralRemarks.Text);<br />
<br />
lblMessage.Text = "Data Input Successful";<br />
<br />
Response.Redirect("VesselLicense_Page2.aspx", false);<br />
}<br />
catch (Exception ex)<br />
{<br />
lblMessage.Text = ex.Message;<br />
}
This is the InsertVslLic1() Method used to input the data in the database (SQL Server 200)
public void InsertVslLic1(DateTime regDate, int martimeRegNo, string vesselName, int vesselCategory, string operativeStatus, int basePort, string vesselRemarks,<br />
string previousAuthorisation, double lenght, double width, double height, string constructionPlace, string country, int constructionYear, string shipyard, string hullMaterial,<br />
string structuralRemarks)<br />
{<br />
try<br />
{<br />
DBConnection db = new DBConnection();<br />
db.OpenConnection();<br />
<br />
string _sqlString = ("EXECUTE spA_FSH_InsertVslLic1 @RegistrationDate = '" + regDate<br />
+ "', @MartimeRegNum ='" + martimeRegNo<br />
+ "', @FishingVesselName ='" + vesselName<br />
+ "', @FishingVesselType ='" + vesselCategory<br />
+ "', @OperationalStatus ='" + operativeStatus<br />
+ "', @FishingVesselBasePort ='" + basePort<br />
+ "', @FishingVesselRemarks ='" + vesselRemarks<br />
+ "', @PreviousAuthorisation ='" + previousAuthorisation<br />
+ "', @FishingVesselLenght ='" + lenght<br />
+ "', @FishingVesselWidth ='" + width<br />
+ "', @FishingVesselHeight ='" + height<br />
+ "', @ConstructionPlace ='" + constructionPlace<br />
+ "', @ConstructionCountry ='" + country<br />
+ "', @ConstructionYear ='" + constructionYear<br />
+ "', @ConstructionShipyard ='" + shipyard<br />
+ "', @ConstructionHullMaterial ='" + hullMaterial<br />
+ "', @ConstructionRemarks ='" + structuralRemarks<br />
+ "', @HomePortID ='" + basePort+ "'");<br />
db.RunSQLQuery(_sqlString);<br />
}<br />
catch (Exception ex)<br />
{<br />
throw ex;<br />
}
Any ideas on how i can fix this? thank you
|
|
|
|
|
|
thanks
|
|
|
|
|
still it does not help...i cannot parse all my fields
|
|
|
|
|
First, please use the <pre> tags instead of the <code> tags. It will help the readability of your code sample.
The comment about using the TryParse (or even Parse ) is valid, but it doesn't apply to all data types. The DateTime and numeric (Int32 , Double , etc.) data types should all have both of these methods.
What is the error you get when you try to insert the data? Have you verified that the SQL statement is correct and that the fields are not set to be non-null in the database?
|
|
|
|
|
hi how get month name from datetime picker like if the date is 20/04/2006 I need month as April.....................
|
|
|
|
|
|
And you can use the CustomFormat property to customize how it's displayed.
|
|
|
|
|
hi!
k, i googled it, i CPed it and couldn't find it..
i've got this code:
<br />
CrReport report = new CrReport();<br />
int copies = 1;<br />
bool collated = false;<br />
int pageFrom = 1;<br />
int pageTo = 1;<br />
report.PrintToPrinter(copies, collated, pageFrom, pageTo);<br />
my problem is that i want to print all the pages of a report..
so i'd have to set pageTo to value of totalPageCount of the report..
but in the report object i can't find any property that would give me this value..
anyone knows how to get that totalPageCount value?
thx for any help!!
life is study!!!
|
|
|
|
|