|
Well,
First of all thats for taking interest.
Now my application is an ASPX application with two sides. One is .VB part where the actions and the code is run on the server and second is the ASPX part where the information is displayed to the client (Preferably in IE or some other browser).
The code that you gave me is working fine but can be only used to validate a certain evernt that is being run on the code. For validation on the client side, I would have to use some scripting language (Preferably Java Script) so that I do not have to post back to the server and thus minimize traffic.
Just wanted to ask if you have any idea how the same concept can be used in Client side validation?
Thanks
The Chameleon
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head runat="server"><br />
<title>Untitled Page</title> <br />
<script language="javascript" type="text/javascript"><br />
function Text1_onblur() {<br />
}<br />
</script><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<input id="Text1" type="text" onblur="return Text1_onblur()" /> </div><br />
</form><br />
</body><br />
</html>
Dude, I know nothing at all about aspx nor javascript. All I just did was open Visual Studio, add a text box, view the source code, select my text box name and choose an event. It automatically generate those codes.
What I'm trying to say is you should explore more about .Net by yourself before asking and also there's MSDN where you can find answer for most of your problems.
CMIIW
WiL
|
|
|
|
|
Dear all,
I was trying to automatically to import data from excel into Access Database.
The code was like this.
Dim myUploadConnection As New ADODB.Connection<br />
Dim SQLString As String<br />
Try<br />
myUploadConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Application.StartupPath & "\HDTL.xls; Extended Properties=Excel 8.0;"<br />
myUploadConnection.Open()<br />
<br />
SQLString = "SELECT * INTO " & _<br />
"[PROVIDER=Microsoft.Jet.OLEDB.4.0; DRIVER={Microsoft Access Driver (*.mdb)}; " & _<br />
"DBQ=" & Application.StartupPath & "\PlasmaDB.mdb;].HDTL " & _<br />
"FROM [HDTL$]"<br />
<br />
myUploadConnection.Execute(SQLString)<br />
myUploadConnection.Close()<br />
<br />
Catch ex As Exception<br />
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")<br />
End Try
When run the proses I received error message "Can't Update. Database or object is read only".
Please tell what have I missed
Many thanks and regards,
WiL
|
|
|
|
|
hi all,
i have my web application running on a server and i found out that the aspnet_wp.exe process causing a high CPU usage on the server (running win server 2k with IIS 5.0 and .net framework 1.1). It caused my application running slow and stopped responding. Is that the framework problem? Any ideas how to solve that? thanks in advance
elcheah
|
|
|
|
|
That depends entirely on what code is running to cause the high CPU usage. Normally, this is something you wrote and not a problem with IIS or the .NET Framework.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
System.NullReferenceException: Object reference not set to an instance of an object. at ForumVB.dotForumTopicEdit.editTopic.submitter_update(Object sender, CommandEventArgs e) in c:\inetpub\wwwroot\ForumVB\admin\topicEdit.aspx.vb:line 109
plz help me...........
|
|
|
|
|
Go to topicEdit.aspx.vb, line 109. Some object there which you're trying to use has a value of null.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
but i already set particular object to allow Null in my database..... why stil got such error???
|
|
|
|
|
Because your trying to call an instance member on something that doesn't have an instance. Without seeing your code around the line that the error is occuring on, we can't help you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
oic, i understand ur meaning... anyway thanks a lot for ur explaintion
Thanks
|
|
|
|
|
I have finished my application, and I since the application will open in the users computer every whole day. I am going to see the memory usage.
It is shock!!
it use up me 45MB memory!!
and I find that, when I change the image of picture box, it use 1MB each time.
How can I free those memory ?
My code in this field is really simple,
<br />
picPreview.Image = Bitmap.FromFile(tempPreviewFile)<br />
Thank you!
|
|
|
|
|
I guess the picture box doesn't manage the memory as it should. Try calling Dispose on the Image before setting another. A better solution is not to use the picture box at all.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
First, don't use TaskManager to look at your memory consumption. You're seeing the memory that your the CLR RESERVES for the entire virtual machine your app is running in, not necessarily used by your application.
Use the Performance Monitor and the .NET counters to see your actual memory consumption. You can also use a memory profiler, like CLRProfiler, to see exactly how your app is allocating memory.
Also, if you do discover that your app isn't releasing memory, make sure you Dispose any graphics objects you're using, specially any and all GDI objects. This also includes images, like Image and Bitmap objects!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Hi, can anyone give me an idea or concept about send and recieve mail in outlook express using vb6?
|
|
|
|
|
Outlook Express doesn't expose any kind of an object model for you to use. It is, for all intensive purposes, a wrapper for Win32's MAPI interface.
Soooo, Google for vb6 mapi[^] and you'll find what you're looking for.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you dave, I also look through an article from http://abstractvb.com/code.asp?A=713[^]. But when i do it in vb6, it say that object require. This error because the default name is MAPIMessages1 but in the code is MAPISession1 . But when i change the name to MAPIMessage1 , there is no Sign on method that I could you in my code. Do you have any solution? An error still keep the same.
|
|
|
|
|
The code is pretty straight forward. So long as you have a reference to the MSMAPI32.OCX, the code will work as documented.
All you did was change the variable name. This doesn't change the control your using, just what you call that instance.
The code works as documented, so about the only thing I can think of is you didn't set a reference to the OCX file.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can i create a long string with a hyperlink(different colored text) in the middle of the string and draw it to the form? I am trying to make it so that when I write the string I can set the link with a key word.. eg... String = "This is my string, so <mylink>click here<mylink>".
can anybody help?
Mark Thibodeaux
|
|
|
|
|
Try using a LinkLabel control. You can setup this control to show both normal text and a link. It can even display multiple links within its text. But you can't add the link from the designer. It must be done in code.
myLink.Text = "This is my string, so click here"<br />
Const linkString As String = "here"<br />
myLink.Links.Add(myLink.Text.IndexOf(linkString), linkString.Length)
-- modified at 20:54 Monday 16th January, 2006
Let me rephrase this a little. The text you enter into a LinkLabel in the form designer will become one big link, which is not what you want. If you want to embed a link within normal text, then you must do this via code as shown above.
|
|
|
|
|
Thanks that works. One little question, I have seen a few balloon tooltips that are floating out there, how do they make it where all you have to do is write your string and wrap the word or words that you want to be a link with their tag (similar to html). Just wondering.
Thank you,
Mark
Mark Thibodeaux
|
|
|
|
|
The standard tooltip control can't display links in it.
You may have to use a 3rd party control or make your own.
|
|
|
|
|
I am responsible for a c++ dll that can be invoked by visual basic. Here is an example c++ prototype for one of the functions:
int __stdcall GetClock(
int device_type,
int address,
char **return_str,
int *return_str_len);
The basic premise here is that the DLL manages a buffer to which it writes text information (like the clock value). When the function is complete, the DLL will have assigned return_str to point to this internal buffer and will also have written the length of the text in the return_str_len parameter.
I am puzzled as to how to do this in visual basic 6. Other people that have been using this DLL have declared the parameter as byref string. The disturbing thing about this is that it appears to work. Any guidance would be appreciated.
Regards,
Jon Trauntvein
|
|
|
|
|
Strings are passed to DLLs a little differently than the other data types in VB6.
Passing a string ByVal (by value) really just passes a pointer to that string. This is how you would normally pass a string in C too, because passing an entire array of characters would be inefficient.
Now, since passing a string ByVal passes a pointer, then logically passing a String ByRef would pass it as a double pointer. So, there you go.
|
|
|
|
|
I still see a problem here. My understanding is that VB uses the BSTR type internally. This type is unicode rather than single byte and, as I understand it, this type also expects the length of the string to precede the pointer. I further believe that VB assumes responsibility for releasing the storage (given that it would be the same as a in/out parameter in COM). None of these semantic rules apply in the case of this DLL and I am obligated to keep the function calls as they are currently defined.
My solution is to change the VB prototypes so that the pointer is passed as a byref long and I have added a new function that VB applications can call that will return the results of the last call as a BSTR object.
|
|
|
|