|
Hi all,
I have one textbox,called Name which is validated for not blank.
Error msg: txtbox not blank.
if click the submit button,the validation applies and eerrror msg. displays --txtbox not blank.
and the cursor is out from the textbox.
my problem is ,after i got the error msg. the cursor will be placed in the textbox name.
i am using
txtname.Focus() but still it is not working.
If txtname.Text.Trim.Equals("") Then
lblError.Text = "Please enter Name."
lblError.Visible = True
txtname.Focus()
Exit Sub
End If
Thanks in advacce
mahaboobs
|
|
|
|
|
You've already done it correctly if this was a Windows Forms app. I take it, from your "JavaScript" post, that this is a Web Forms (ASP.NET) app?? You may want to ask this question in the ASP.NET Forum.
|
|
|
|
|
Hi,
I am writing a code for a calculator.
My problem is:
when I calculate with
Windows Calculator
I get:
Math.Sqrt(69) = 8,3066238629180748525842627449075
8,3066238629180748525842627449075² = 69
when I do the same in my code in
vb.net 2005 (Variables are Decimal)
I get:
Math.Sqrt(69) = 8,30662386291807
8,30662386291807² = 68,9999999999999
Is there any chance to get the same as in win.cal
Thanks
housekeeper
|
|
|
|
|
U can use a object to store a content otherwise copy the ans to string variable then paste into textbox. Maybe it will work.... Try it if it work reply me.
Thanx's
Rao.
|
|
|
|
|
Square roots are just the estimated values and not the exact one. In case you need more accurate results, I guess you will need to write your own logic.
As far as square root of 69 is concerned, double just works fine for me.
|
|
|
|
|
It's because of the way that floating point numbers are stored and handled in binary.
Just like in decimal, there are some numbers that can't be written down exactly - For example one third is 0.33333 (with repeated 3's forever). So you have this problem:
(1/3) * 3 = 1
but
0.33333 * 3 = 0.99999
To be able to write one third correctly as a decimal number you would need to write infinite 3's after the decimal point. Numbers like this are described as being 'unrepresentable'. It gets worse in binary. In binary many more numbers are unrepresentable. In binary 0.1 is unrepresentable!.
So that value stored in a floating point variable may not be exactly the required value. The decimal type in C# is meant to help with problems like this, but it's not perfect because ultimately some numbers are unrepresentable in decimal too.
You should do some reading about the problems and solutions for floating point number calculations.
There are a few articles on CP that might get you started:
http://www.codeproject.com/KB/dotnet/ExtremeFloatingPoint1.aspx[^]
http://www.codeproject.com/KB/recipes/float_point.aspx[^]
And wikipedia has some information on float point accuracy:
http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems[^]
Windows calc might just be getting it right by chance because it is storing more decimal places. Or it might just be rounding the answer up to make it look correct. Or it might be using more complex number storage/handling to arrive at a more accurate answer.
Writing a truly accurate calculation system is not an easy task. If you really want to be 100% accurate you need to do a lot of study, or consider looking at buying proper numerical analysis software[^]. You might find some of them are open source, which could help give you some tips if you really want to write your own.
Simon
|
|
|
|
|
Hai all,
can anyone send me the javascript for :
textbox allow only numbers with hyphen
Thanks in advance.
|
|
|
|
|
|
And this has what to do with VB.NET??
|
|
|
|
|
Dave Kreskowiak wrote: And this has what to do with VB.NET??
Its alright, he already posted it in the asp.net forum as well
(and his other question )
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Dear Everyone
I am building a VB.Net application with SQL Express following n-tier approach. I have completed the BLL and DAL with VB.Net front-end. I have created all the required SQL SP's for CRUD. Since, I am new to VS.Net, I dont know how to use the DataGridView with Stored procedures to Display, INSERT, UPDATE & Delete data through Coding.
Your help will be appreciated.
|
|
|
|
|
If you've completed the DAL, what's with the question, since everything you're asking should be already be in the DAL?? You don't use stored procedures with the DataGridView. You bind it to a database source, such a a DataSet, DataTable, ..., some custom collection you've written.
|
|
|
|
|
Thank you for the prompt answer. But, do I have to use databinding or have I got to pass all individual datagridview columns as parameters to the DAL via BLL (I am new pls). I just need some eg as to how to pass the data to DAL via BLL from DGV. I have already done this to textbox controls on forms, but does not know how to do this with DGV. Does each new record has to be passed or the entire dataset can be synchronised to the DAL.
modified on Tuesday, November 11, 2008 9:01 PM
|
|
|
|
|
|
When I run the windows application, sometimes I get such error message
"The CLR has been unable to transition from COM context 0x1a6fd8 to COM context 0x1a6e68 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations."
Can I know why such error message we get?
Regards,
John.L.Ponratnam
|
|
|
|
|
You may have a long running process in which .Net displays a error from the debugging assistants.
Press CTRL+ALT+E to open the Exception options. I think this error is the Managed Debugging Assistants - ContextSwitchDeadlock. Try unchecking that setting and retrying the app.
Did this work for you?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
modified on Tuesday, November 11, 2008 7:57 AM
|
|
|
|
|
Greetings:
I am a systems administrator with absolutely no experience with coding. My interest is in the coding between bluetooth headsets and devices such as cell phones. I have Visual Studio 2005 professional edition... unopened. I write to inquire:
- What are the prevailing coding platforms for headset to device communicatons?
- Are there free and available coding modules in the language of Visual Studio that would facilitate headset to device communications?
- What on this site would facilitate my learning curve with regard to coding and the general scope of headset to device communications?
Much thanks for your attention as I await your reply.
|
|
|
|
|
Well, if the device supports Bluetooth, it should already support headsets, with no code from you. If you're looking to write a bluetooth profile or driver and you have no coding experience, you don't have a hope in hell of pulling this off. This is an advanced level project that cannot be done in VB.NET.
|
|
|
|
|
I am a network administrator who recently thought of a unique use of headset technology. The device I speak of does not yet exist I am trying to grasp my way through what it would take to bring this idea to the next level. Visual Studio came into play when the Microsoft usability team interviewed me on other matters... VS 2005 Pro was my gift. How can I find out what coding languages are commonly used for converting voice commands to devices such as cell phones? Much thanks for your timely reply and apologies for my novice status
|
|
|
|
|
Typically, C++ is used. The language you pick, on a project such as this, is usually dictated by the device and SDK's used to write code for it.
|
|
|
|
|
Hi i have a webpage which displays a datagrid with corresponding check boxes for each recodrs when i select a record by selecting a check box and then click a submit button,a pop up form must come to send mail.
I have accomplished doing this but now what i want is:
the pop up form is for sending email and it has certain attachments which we have to choose to send with the mail and the TO address must be the ID of the person in the datagrid (and this id should be displayed automatically in the pop up form) is this possible can anyone guide me with a sample how to do this
|
|
|
|
|
I am confused. Did you not notice that we have an ASP.NET forum ? The rest seems trivial to me, do you know how to send an email at all, b/c that appears to me all you're really asking for. Or, are the attachments on the client machine and you don't understand how ASP.NET works ?
Christian Graus
Driven to the arms of OSX by Vista.
"Iam doing the browsing center project in vb.net using c# coding" - this is why I don't answer questions much anymore. Oh, and Microsoft doesn't want me to.
|
|
|
|
|
thank u but if u dono leave it dont want to respond like this
|
|
|
|
|
Well, if you don't want responses like his, you have to be clearer in your question. If you don't respond to questions about your question in a civilised manner, you are not likely to get any help at all.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Ukindly tell it to Graus how to reply in civilised manner u donno what were his responses to my past questions i never replied u like this
|
|
|
|