|
Hi,
I am wondering if I can have a drop down list launching a sub without autopostback on?
I need it to populate another DDL when an item is selected...
The reason I want it to happen without autopostback on, is, I have so many many active items on page it takes forever to populate the second drop down list, and redisplay a datagrid...
Unacceptable, takes way too long...
So, in short: how to launch a sub from the DDL when selected index changed, without autopostback on (or if you have another suggestion on how to prevent whole page to reload)
NNM
|
|
|
|
|
use AJAX methos.
Softy Boy
|
|
|
|
|
thx for reply,
I'll have to look more at that ajax thing..
But for now, is there no asp element i can put the grid (and other panels/controls) in to prevent it from "blinking" every time a value in my drop down lists changes?
Or no vb.net solution to preventing this, and really have control over what happens on a selectedindexchanged..?
|
|
|
|
|
ii_noname_ii wrote: is there no asp element i can put the grid (and other panels/controls) in to prevent it from "blinking" every time a value in my drop down lists changes?
Not an official release version but you could try using the UpdatePanel component in the latest Atlas[^] CTP (which would be implementing Alax style controls).
Bear in mind that because the Atlas stuff is still pre-release it may be buggy & you shouldn't use it for any mission critical solutions. Apart from that i think the license agreement only runs till September 2007 (i'm open to correction there).
You could try doing it via client side scripts but that would probably be ridiculous.
|
|
|
|
|
A client side script launching a server side vb sub (which would then populate the next DDL)? that possible? (don't think so, but it would be nice...)
I guess I'm gonna look at that atlas thing, I failed to install/get it to work on my porject last time I tried it...
Still waiting if someone has a miracle solution like "just put your datagrid in <asp:[magicantipostback[> !"
|
|
|
|
|
ii_noname_ii wrote: A client side script launching a server side vb sub (which would then populate the next DDL)? that possible?
Yep, it is possible, but you'll still postback. The upside of ajax is that you're not posting the entire page back, just the bit that you need.
ii_noname_ii wrote: I failed to install/get it to work
I had a problem installing it on my machine at home as well but you can still make use of the tools when you reference the Microsoft.Web.Atlas.dll file. Remember to add the atlas tools to your toolbox as well - they're not automatically added when you reference the dll.
I've used the UpdatePanel from the atlas library more than anything else. It'll also be useful for you to download & watch the ToDo list sample application video[^] by Scott Gu.
|
|
|
|
|
It works!!!!
*champagne for everyone*
http://www.kynou.com/KYNOUControls.htm[^]
A very good tutorial.
Worked like a charm.
This is gonna make my webapp 100 times better...
(and I think Allmighty Mr.Microsoft (not being sarcastic, I really love MS :P) should really include this (or something similar) in .net as a standard option)
|
|
|
|
|
Running out of time for today, but will check here soon..
Seems once I've picked an item on drop down list nr.2 it won't repopulate after i change on nr.1 again..?
|
|
|
|
|
Although everything functions okay, I want to get rid of this warning (VS2005):
Warning: Type library exporter warning processing 'myCOMClass.FTPUtils.FTPdirectory, myCOMClass'.
Warning: Type library exporter encountered a type that derives from a generic class
and is not marked as [ClassInterface(ClassInterfaceType.None)].
Class interfaces cannot be exposed for such types.
Consider marking the type with [ClassInterface(ClassInterfaceType.None)] and
exposing an explicit interface as the default interface to COM
using the ComDefaultInterface attribute.
I have create a COM Class with the following structure:
Imports System.Runtime.InteropServices
<Guid("AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE")> _
Public Interface ImyCOMClass
Function FTPUpload(ByVal localFileNameFull As String, ...) As Boolean
Function FTPDownload(ByVal localFileNameFull As String, ...) As Boolean
End Interface
<ClassInterface(ClassInterfaceType.None), _
Guid("FFFFFFFF-GGGG-HHHH-IIII-JJJJJJJJJJJJ")> _
Public Class myCOMClass
Implements ImyCOMClass
Public Function FTPUpload(ByVal localFileNameFull As String, ...) As Boolean _
Implements ImyCOMClass.FTPUpload
Return (New WebUtilities()).UploadFile(localFileNameFull, ...)
End Function
Public Function FTPDownload(ByVal localFilenameFull As String, ...) As Boolean _
Implements ImyCOMClass.FTPDownload
Return (New WebUtilities()).DownloadFile(localFilenameFull, ...)
End Function
End Class
I added ftpclient.vb which you can find at http://www.codeproject.com/vb/net/FtpClient.asp to my project.
So the structure is:
myCOMClass.FTPUpload -> WebUtilities.UploadFile -> New FTPUtils.FTPclient().Upload
The above mentioned warning is caused by the following definition in ftpclient.vb:
Public Class FTPdirectory
Inherits List(Of FTPfileInfo)
Some suggestions?
|
|
|
|
|
I've written a simple routine to load a comma-delimited data file into an Access table, and I would like to automatically clear the receiving Access table before inserting the new data. The problem is that I can't find any tips on how to do that. Using the MyTable.Clear( ) command seems to only clear the in-memory version of the table, not the external table on the hard-drive. At the very worst, there must be a SQL command that I could execute to empty the table so that I don't append the new data to the old.
Does anyone know how to accomplish this? Thanks for any help.
Michael AJ
|
|
|
|
|
MAJackson wrote: At the very worst, there must be a SQL command that I could execute to empty the table
Simple in SQL
Delete * From Table
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
S Douglas,
Thankyou, it worked perfectly.
code:
DataConnection.Open()
oleDbCommand.CommandText = "Delete * from Table1"
oleDbCommand.ExecuteNonQuery()
DataConnection.Close()
Obviously I will have to learn SQL. Especially since I want to reset the automatically generated key values to start from 1 every time. My guess is that I will have to remove the table from the database, and recreate it in code, each time I reload the table. But then...I really don't expect to run this program more than once, anyway.
It was a case of loading the data by hand...over many weeks; or writing a program to do it...over many weeks...and getting a learning experience out of it. This way was a lot more fun.
Michael A.J.
|
|
|
|
|
MAJackson wrote: Thankyou
Your welcome.
MAJackson wrote: Obviously I will have to learn SQL.
The basics; C.R.U.D. (Create, Read, Update, Delete)
C == Insert into Table (column) values ('value')
R == Select Column From Table
U == Update Table Set column='value'
D == Delete * From Table
All of those queries support the where clause, where is filtering for specific data.
There is lots to learn, I sugguest a good ADO.NET book and a TSQL book.
MAJackson wrote: Especially since I want to reset the automatically generated key values to start from 1 every time. My guess is that I will have to remove the table from the database, and recreate it in code, each time I reload the table.
That's a lot of work and you loose all of that data, consider creating a seperate table with one integer column using that as the counter and every week resetting it back to one. When you need a new number read the current value increment by one and update it. Add a new counter column to your current schema and leave the primary key there to do its thing.
MAJackson wrote: It was a case of loading the data by hand...over many weeks; or writing a program to do it...over many weeks...and getting a learning experience out of it. This way was a lot more fun.
Nothing like letting a computer do what it was designed to do.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hi all.
(windows forms).
How I can get the text of a textbox that is on other app?
Example:
I have an app running that has a textbox which Text property is "MICROSOFT VISUAL STUDIO ROCKS!".
I want to make an application that will obtain the handle of that textbox and get its contents (its text property value). I already have the code that obtain the handle.
I think that I need to use WM_GETTEXT in conjunction with OpenProcess, WriteProcessMemory, SendMessage and ReadProcessMemory. But I have no idea how to do it.
Please help me.
Thx in advance.
Best regards,
Marco Alves.
|
|
|
|
|
Hello,
I am looking out for a logic to calculate the date according to the no. entered in the textbox. For e.g. as the form gets loaded in runtime it displays the current date in the date control, and there is one text box in which numeric value 5 is specified and the third part is their is one more date control on the same form which will add 5 days to the current date and display.
For e.g.
In first date control current date is displaying as 29/08/2006
In the textbox below numeric value 5 is specified by default.
In second date control which is just below the textbox should display 03/09/2006
it has jumped to next month even
does any body knows how it can be done, waiting for kind and quick response.
Nikhil Bandekar
Mumbai,
India
|
|
|
|
|
Use the AddDays method of the DateTime class to add a number of days to a date:
DateControl2.DateProperty = DateControl1.DateProperty.AddDays(Int32.Parse(TextBox.Text))
---
b { font-weight: normal; }
|
|
|
|
|
Thank you very much it works but i changed the code little bit by typing datecontrol.value instead of date property and it works fine
Thanks a lot.
Nikhil Bandekar
Mumbai,
India
|
|
|
|
|
How Can i create a control that add to my other controls a propierty like tooltips. for example when you add to your form a tooltips control all the control appear with a new property name tips. i need to know how can i make for my control do that.
Magno R. Vasquez (Gbyte)
|
|
|
|
|
Hi,
I am having problem adding a datatable into a database. I have a gridview in my form, that gets it's datasource programmatically using a data adaptor.
gv.datasource = mydatasource
In my properties window, I enable editing, adding and deleting for the gridview.
Now I have a problem to add the new rows/columns(update) back to the database, programmatically.
Is there any way to do this?
|
|
|
|
|
First, when you configured your data adapter did you add update/insert statements?
If yes, then here's how to do it.
1. Create a new datarow off your dataset,
2. Add data to that datarow.
3. Add the row to the dataset.
3. Update the data source through the data adpaters Update method.
e.g. some sample code to update a name & surname to a database. (ds1 = dataset, da1 = data adapter, conn = connection).
'create a new datarow off a dataset
Dim dr As DataRow = Ds1.tblNames.NewRow
'add data to the row
dr.Item("Name") = txtName.Text
dr.Item("Surname") = txtSurname.Text
'add the new row to the dataset
Ds1.tblNames.Rows.Add(dr)
'update the data source
Try
conn.Open()
da1.Update(Ds1)
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Close()
End Try
You will obviously need to perform validation on the data to ensure that it is valid but that's the basic idea.
Hope that helps.
|
|
|
|
|
Hi,
Can we do the Web Part(ASP.NET) type functionality in Windows Form. If anybody having any idea or article, could you please share with me?
|
|
|
|
|
Hello Dear,
I want to develop a program that will be connecting to two or more computers which will be located in two or more diferent countries (e.i. USA and other country). It'll be kind of a chat program. If I were to open a business in another country while I am residing in the USA, I want to abe able to check my business through this program.
I have experience writing programs that run just in local computers. I have a good understanding and experience with the languages below. It is my first attemp to develope an application or program of this magnitude.
Tools I have available :
VB 6.0
VB.NET
C++.NET
MS SQL Server 2000
MY SQL
Microsoft Access
** I know some COM+
Would any one give me his/her suggestion.
--I would like to know how to do the connection between two or more computers located in diferent countries.
--Do I have to talk to my telephone service company to give me some access point. Or I can just simply use the internet?
--In terms of Development:
+ Which of the above languages will be more efficient for this project?
+ Should I use Remoting, Webservice, or TCP/IP Connection?
Any suggestion, idea or brainstorming will be appreciated.
Thank you
Amadeo
Amadeo
|
|
|
|
|
Hi
First you need the I.P of the other computer that you want to connect to. Either it must have a static ip / dynamic ip. If it is static ip then you can connect to that computer easily. if it is dynamic ip, you need some application to run on the dynamic ip machine to inform the current ip that it has been assigned.
hope this helps.
Kanniah
|
|
|
|
|
How can i open pdf file and stamp on all the pages using VB.net
Mansoor
|
|
|
|
|
Hi
Is it possible to display all child records of a datarelation and not just one at a time? I want a grid that the user doesnt have to open the child relation to see the contents, all parent and child records must be displayed.
If not with the datagrid that comes with Visual Studio, any free controls that can?
Thanks
Izak
|
|
|
|