|
You're welcome. I'm glad you got it sorted.
|
|
|
|
|
Hi, i am new to asp.net. i need to display complete URL of my website in web browser. if user navigate to some other page the url must include address of that page too. plz do help..
|
|
|
|
|
Varsha R wrote: Hi, i am new to asp.net
Fair enough, but isn't that a great big hint as to which forum you should post this question in instead?
|
|
|
|
|
|
How do you programmatically expand a url link to its true location?
Do you know about tinyurl.com and baidu.com? Baidu.com is a search engine that tries to discourage people from using their web site to make metasearch engines by hiding their links in a way that is a lot like how tinyurl.com works. TinyUrl.com is a web site where, if you want to present someone with a link to something and that link is long, you can use tinyurl to produce a tiny url for presentation purposes.
Anyway, what I want to do is to find a way to programmatically take the link http://www.baidu.com/link?url=mW91GJqjJ4zBBpC8yDF8xDhiqDSn1JZjFWsHhEoSNd85PkV8Xil7qccoOX3rynaE (the first link in a search for Jessica Alba using baidu.com) and have it return the actual link, http://baike.baidu.com/view/270790.htm . That is just one example. What I want to do is not specific to Jessica but for using Baidu.com as part of my group of search engines in my meta search engine project.
Maybe there is a way of using the WebBrowser class but I did not see a member that was the URL.
Maybe there is a way of using WebRequest and WebResponse.
|
|
|
|
|
By requesting the URL shown on Baidu. Then analyse the response. Somewhere there you'll find the redirection information, either in the HTTP header (e.g. a REDIRECT response code plus the correct URL) or a JavaScript in the HTML document, or something similar.
Do not forget that Baidu could find out that you do too many surch requests, and just stop responding to your requests (e.g. block your IP address).
|
|
|
|
|
I am a VB.NET Programmer learning C#. One of my applications I transfered over to C# via an online converion tool. I am receiving an error which I do not see why it's causing an error.
What I have now is:
try {
if (System.IO.File.Exists(srcedest) == false) {
My.Computer.FileSystem.RenameFile((dest), newName) sheet.Cells(row, 1).value;
}
} catch (Exception ex) {
txtLog3.AppendText(sheet.Cells(row, 1).value);
}
With the error of "expecting ;" at the "sheet" in My.Computer.FileSystem.RenameFile((dest), newName) sheet.Cells(row, 1).value;
Why would this cause an error since you don't put a ";" until the end of a statement?
Thanks in advanced.
daveofgv
modified 27-Nov-12 16:52pm.
|
|
|
|
|
Dunno, maybe remove the newName) and stick a ) just before the ; ?
|
|
|
|
|
Apparently, I can only report you. Spam or Abusive.
The new UI must be a huge success, if it's causing the hamsters so much overtime.
|
|
|
|
|
My.Computer.FileSystem.RenameFile((dest), newName) sheet.Cells(row, 1).value; Your second line isn't the same as the first one. The reason is down to the fact that in the VB line, it's attempting to put sheet.Cells(row,1).value into the optional parameter newName. In your version, you don't do that - so the statement ends after the call to RenameFile.
|
|
|
|
|
Using a parameter name followed by a := means that you create that variable on the fly and assign the value to it. Just think of two statements:
string newName = sheet.Cells(row, 14).value + "_" + sheet.Cells(row, 15).value);
My.Computer.FileSystem.RenameFile(dest, newName);
|
|
|
|
|
Try to change to this line
My.Computer.FileSystem.RenameFile((dest), newName = sheet.Cells[row, 14].value + "_" + sheet.Cells[row, 15].value)
|
|
|
|
|
Hi All
How I can integrate a finger print demo inside asp.net with C# application?
Also how I can customize my SDK to search and match the fingerprint by C# connecting to SQL server
Plz provide ur help or guidance as u can
Thank u
|
|
|
|
|
a) don't use bold: it's shouting!
b) what have you already tried for yourself?
c) one question at a time.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
To add to that;
- It's a lousy subject line; doesn't tell us anything about your problem.
- You're not urgent to me. Why would it, just because it's included in the subject?
- Don't use text-speak. We're not sms-ing, and you don't pay by the character.
Asma AlShehhi wrote: How I can integrate a finger print demo inside asp.net with C# application?
Depends. Read the documentation that comes with the SDK. Yes, it's called "research".
Asma AlShehhi wrote: Also how I can customize my SDK to search and match the fingerprint by C# connecting to SQL server
By having each known fingerprint known in a table, and executing a query to verify it's authenticity.
|
|
|
|
|
I miss being able to upvote answers like this...have a virtual 5!
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
Please stop yelling at us.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
You are so lucky downvoting is turned off at the moment ...
|
|
|
|
|
I have a c# .net project that has a button on the form. When the button is clicked twice, bad things happen. How do I disable the button?
I've tried disabling my button as follows but it doesn't work.
btn_Program.Enabled = false;
I've searched for this online, but every solution seems to reference asp.net. I don't think I have that, do I? I'm fairly new to c# and visual studio, so I may have it and not know it.
I liked the following discussion, but again, it refers to asp.net.
http://stackoverflow.com/questions/8473261/how-to-disable-a-button-after-1st-click[^]
The example I liked had the following code in it, but when I add it to my form class, it gets a compilation problem for ClientScript and Attributes:
static void DisableButtonDuringPostback(Page page, Button control)
{
StringBuilder sb = new StringBuilder();
sb.Append("this.disabled = true;");
sb.Append(page.ClientScript.GetPostBackEventReference(control, control.ID.ToString()));
sb.Append(";");
control.Attributes.Add("onclick", sb.ToString());
}
It said to add the following to Page_Load
DisableButtonDuringPostback(this.Page, Button3);
Compilation problems:
1. 'System.Windows.Forms.Button' does not contain a definition for id and no extension method id accepting a first argument of type 'System.Windows.Forms.Button' could be found (are you missing a using directive or an assembly reference?)
2. System.Windows.Forms.Button does not contain a definition for Attributes and no extension method Attributes accepting a first argument of type System.Windows.Forms.Button could be found (are you missing a using directive or an assembly reference?)
Any help would be very much appreciated.
|
|
|
|
|
Add a timestamp; if it comes in again, compare the current time to the datestamp you saved earlier. If it is <2 seconds, ignore and cancel execution of the request.
|
|
|
|
|
I ran into some issues with the other idea and now I'm using your idea. Works great! Instead of using the timestamp, though, I set a boolean flag, and reset it when I'm ready for a second click.
modified 30-Nov-12 13:52pm.
|
|
|
|
|
<quote>
btn_Program.Enabled = false;
Are you sure that btn_Program is the correct button to disable?
Since you aren't sure to have started an ASP.NET project, I will assume you have a Windows Forms project instead. That would mean that you have a button click event handling routine somewhere that looks similar to this:
void btn_Program_Click(object sender, EventArgs e)
{
}
To definitely disable the correct button, you can use the sender parameter:
void btn_Program_Click(object sender, EventArgs e)
{
System.Windows.Forms.Button methodStartingControl = sender as System.Windows.Forms.Button;
if(methodStartingControl != null)
{
methodStartingControl.Enabled = false;
}
if(methodStartingControl != null)
{
methodStartingControl.Enabled = true;
}
}
Ciao,
luker
|
|
|
|
|
This seems to be working! Thanks!
|
|
|
|
|
Thank you! I tried the other one first, but this looks good too. For some reason I'm not seeing the ratings thingy, so I'll check back later.
|
|
|
|
|
Hi,
I was wondering if anyone could recommend any good (top) books to learn C# from complete novice. My main (only at the moment ) reason for learning C# is to use it for mathematical modelling, hence a book with a focus on Engineering (preferably) or mathematics will be highly appreciated.
Note:
I have some experince with Java scripting, HTML, CSS...the usual.
No experience with MatLab.
Many Thanks in Advance
|
|
|
|