|
Is it possible to write the current date into a registry key during installation through the registry editor available for the setup project. The key should contain the current date of installation. Is it possible to give code/command anywhere for that key to store the current system date/time.
|
|
|
|
|
One post is enough.
Regards,
Satips.
|
|
|
|
|
Sure. It would take building a Custom Action[^] in your setup project. You'd have to supply to code to write the date to the registry.
|
|
|
|
|
|
I have been banging my head over something which is probably very simple.
I have a user control that i created using VB.NET 2005. It contains several labels.
The user control is dynamically created within another application along with an event handler (AddHandler UserControl1.Click, AddressOf Clicked) based on records retrieved from a database table.
When the control is clicked, a webbrowser control is passed a URL containing querystring data that gets assigned to the UserControl and the webbrowser control opens the page satisfying the parameters.
This is all fine. the problem is that when the UserControl is clicked, the event handler only works if you click off of the labels. If you click the labels, the click event is not fired.
can anyone point me in the right direction?
JB
|
|
|
|
|
JB of Three wrote: the problem is that when the UserControl is clicked, the event handler only works if you click off of the labels. If you click the labels, the click event is not fired.
Of course. The labels sit on top of the surface of the UC. Your UC internal Click event will only fire in response to clicking on the UC surface, not the labels. If you want the full control to respond to this, your UC will have to handle the Click event for all of its constituent label controls also. If this handler, you'd just call RaiseEvent on your UC's Click event, or call OnClick to do it for you.
|
|
|
|
|
I have a Cobol stored procedure that contains multiple queries. Currently I am passing a variable and based on that I am executing the corresponding query and the results from the query is filled up in a global dataset using adapter.fill(Dataset,"table name1"),adapter.fill(Dataset,"table name2") based on which table I access.
If I am to call the SP only once and access multiple queries/tables then how do I fill up this dataset?
Thanks,Arun
|
|
|
|
|
If a single Fill command executing a stored procedure returns multiple result sets, each set will end up in a seperate table in the DataSet you are filling. You can then filter the data any way you want. It's an in-memory copy of what was returned by the SP.
|
|
|
|
|
Simple:
adapter.Fill(Dataset)
Should create multiple datatables under the table collection named Table1 .. TableN I believe.
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
Hi, I am new to msg boards but I'm hoping to find some insight into what I have to do.
I have been assigned the task of opening a microsoft word document through an internal corporate website. So far, my google searches have shown solutions use a WINDOWS APPICATION and adding a reference to the Microsoft WORD object Library. I have done this successfully.
Is there a way to open Word calling it from a web application? Or is there a way to call the windows application(.exe) from behind the .aspx page to fire off word?
Any suggestions would be helpful.
graphic controls
brian k
|
|
|
|
|
kindzieb wrote: I have been assigned the task of opening a microsoft word document through an internal corporate website.
What does this mean? Are you trying to open the document on the client side so they can view it? Easy, just supply a link to the *.doc file and Word on the client side will take care of the rest.
If you're trying to open the document on the server side (in your ASP.NET codebehind) to do something to the document, you've got a problem. Word is a very heavy weight object. If your server has lots of users doing this, well, let's just say that using Office on the server side is a great way to bring your server to it knees.
kindzieb wrote: Is there a way to open Word calling it from a web application? Or is there a way to call the windows application(.exe) from behind the .aspx page to fire off word?
No. The server code (ASP.NET codebehind) has no access to anything on the client side.
This might be done with JavaScript in your web page, but not by any VB.NET or C# code in the code behind. The C# or VB.NET code runs exclusively on the service side and has no access to anything on the client machine.
|
|
|
|
|
Thank you for the reply Dave.
I guess I'm trying to actually write to a word doc from data gathered from a form.
For example, a user would be filling in contact information on a form and writing it to a fax template word document. This is only possible on the server side? which is not recommended? or?
We do something similiar writing out to an Excel doc, using a datagrid which does something like this:
Page.Response.ContentType = "application/x-excel"
Page.Response.Write("" & vbLf)
Page.Response.AddHeader("Content-Disposition", "attachment;filename=Quotes.xls")
[myDataGrid].WriteXml(Page.Response.OutputStream)
Page.Response.Flush()
graphic controls
brian k
|
|
|
|
|
kindzieb wrote: For example, a user would be filling in contact information on a form and writing it to a fax template word document. This is only possible on the server side? which is not recommended? or?
You're getting information from the client and putting it into a Word document on the server side. It can be done, provided Word is installed on the IIS server. There's plenty of example of automating Word. Google for "Visual Studio Tools for Office". Be aware that Word is a heavy weight object that can bog down your server and eat a ton of RAM if you're not careful.
kindzieb wrote: We do something similiar writing out to an Excel doc, using a datagrid which does something like this:
Page.Response.ContentType = "application/x-excel"
Page.Response.Write("" & vbLf)
Page.Response.AddHeader("Content-Disposition", "attachment;filename=Quotes.xls")
[myDataGrid].WriteXml(Page.Response.OutputStream)
Page.Response.Flush()
This is exactly the opposite. Your sending an XML file to the client that the client opens in Excel. No automation of any Office app is done on the server side.
|
|
|
|
|
Thanks again Dave. I guess what I would really rather do is accept data from the client side and put it into a word DOC on the Client side as well? Is that a possibilty? Using XML perhaps?
What is your best suggestion?
graphic controls
brian k
|
|
|
|
|
No, not using C# or VB.NET. You'd have to use JavaScript entirely on the client side to do this. I have no idea if it's even possible.
|
|
|
|
|
Hi everyone,
Does anyone know how to get access to variables in a form from a custom control inherited from a bindingsource
I was thinking of using a method like findform but bindingsource doesnt have that method
What i need to do is share a variable between several of this custom controls which are in a form, but i havent found a way to access a variable in a form from this custom controls
- I wouldnt like to write a file and read it from each custom control.
- Custom controls are not in the same project as my win app, its just a custom control that i need to share betweeb several apps.
Does anyone know any way to achieve this?
Ill appreciate any comments
Thank you
Alexei Rodriguez
|
|
|
|
|
Have you looked into adding a Private Shared class-scoped variable to your control?
|
|
|
|
|
Thanks for your reply Dave
I havent tried that
Could you tell me how would i use it?
The variable that i need would be in the main form or a global variable in the main project and needs to be accessed from this custom controls
Id rather not to create a public property on the control and assign a value from the main app, since this control is already in use, and i would have to modify all of those apps
Detailed Info:
I have a custom control that connects to a web service, ive been using this control in some applications and has worked fine, but now i need to keep session info on the server side which hosts the web service, but the controls dont keep session info automatically, so, using the CookieContainer of the webservice class created for me using the option "Add Web Reference" the control is able to access the same session that the control started when it first connected, but when i access from another of my custom controls, there is no session info, and a new session is started, to access the same session, i have to share the CookieContainer of the control that first connected to the web service to every control that is on my app, thats the variable that i need to share
If you know of any better way to accomplish this, ill appreciate it
Thanks again
Alexei Rodriguez
|
|
|
|
|
AlexeiXX3 wrote: Could you tell me how would i use it?
Private Class MyBindClass
Private Shared someVariable As Integer
AlexeiXX3 wrote: The variable that i need would be in the main form or a global variable in the main project
You can't do that because the class you created will have no idea what code called it. And, it shouldn't even care.
AlexeiXX3 wrote: I have a custom control that connects to a web service, ive been using this control in some applications and has worked fine, but now i need to keep session info on the server side which hosts the web service, but the controls dont keep session info automatically, so, using the CookieContainer of the webservice class created for me using the option "Add Web Reference" the control is able to access the same session that the control started when it first connected, but when i access from another of my custom controls, there is no session info, and a new session is started, to access the same session, i have to share the CookieContainer of the control that first connected to the web service to every control that is on my app, thats the variable that i need to share
If you know of any better way to accomplish this, ill appreciate it
This would have helped from the very start. Web Services are not my area of expertise. As I understand it, Web Services are meant to be static methods and stateless.
Off the top of my head, you'd have to have an external store to keep session data persisted and pass a session id back top the client on the first request. The client would then have to pass it's session ID back to the web service on every call. Anything you wanted to save between calls in an individual session would have to be serialized into the persistant storage and deserialized into every call.
Storing values to be used between multiple sessions at the same time would also require an external storage to persist the shared variable, like a database table.
But, that was all off the top of my head with the limited knowledge I have of web services. I'd probably start reading something like this[^] if I wanted to find out more.
|
|
|
|
|
As i am looking at the code to print all the files existing in a folder using VB.NET. Can any body help me out on this issue.
SaiRamk@vjil.com
|
|
|
|
|
Check out the methods on 'System.IO.Directory'.
|
|
|
|
|
Hi guys.
I have a problem with my dropDownList.
I have a dropdownlist(name DropDownList1) in vb.net(Default.aspx.vb) preloaded with values from the database that run perfectly each time I run the page.Now the problem I get is, it seems it doesnt recognice one of the values given to print.Watch how [Branch] a string.
When I select a value from the dropdown, it must go to the database and look for that value and print vertain fields. See below
Imports System
Imports System.Data
Imports System.Data.OleDb
Partial Class _Default
Inherits System.Web.UI.Page
Dim da As OleDbDataAdapter
Dim cn As New OleDbConnection
Dim rid As OleDbDataReader
Dim cm As New OleDbCommand
Dim cb As OleDbCommandBuilder 'to create Update, Insert and Delete commands for DA
'Dim zz As OleDbConnectionStringBuilder
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
cn = New OleDbConnection("Provider = Microsoft.Jet.oledb.4.0; data source = C:\TelephoneList.mdb")
cn.Open()
cm = New OleDbCommand("Select * from [Other Branches] where [Branch] = '" & DropDownList1.SelectedValue & "'", cn)
cm.Connection = cn
If cn.State = ConnectionState.Open Then
cn.Close()
End If
cn.Open()
rid = cm.ExecuteReader
While rid.Read
LabelBranch.Text = rid("[Branch]")****problem here
End While
rid.Close()
cn.Close()
Application.Lock()
End Sub
End Class
Please help guys
kagiso
|
|
|
|
|
Have you stepped through the code to see what's returned in that DataReader? If nothing is returned, then you're not going to get anything in that label. Even worse, you could end up getting something, but since your replacing the contents of the label with each record returned by your query, if the last record is empty, you'll get an empty label.
|
|
|
|
|
how can i make a text-2-speech application for "Pashto" Language.Thats an eastrn language.our sujjest the basic steps to make it.
anybody help me pleeeeeeeeeeeeeeez!
|
|
|
|
|
The basic steps have been suggested to you several times. Fact is, it's a big, big project, and you need more help than you're going to get from a forum reply, to do it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|