Hi
I am working on a web project.
I have a InstallerClass in my project.
While making setup ( using web setup template) for this web application, I
have added a userinterface with 4 textboxs, and added assembly to
CustomActions-->Install
In the installer class I have the following code
Public Overrides Sub Install(ByVal stateSaver As
System.Collecti ons.IDictionary )
MyBase.Install( stateSaver)
Dim SName, Uname, PWD, DName As String
SName = Trim(Me.Context .Parameters.Ite m("ServerName") )
Uname = Trim(Me.Context .Parameters.Ite m("UserName") )
PWD = Trim(Me.Context .Parameters.Ite m("Password") )
DName = Trim(Me.Context .Parameters.Ite m("DatabaseName "))
If Trim(SName) = "" Then
Throw New InstallExceptio n("No arguments specified for
ServerName")
End If
If Trim(Uname) = "" Then
Throw New InstallExceptio n("No arguments specified for
UserName")
End If
If Trim(DName) = "" Then
Throw New InstallExceptio n("No arguments specified for
DatabaseName")
End If
Dim strConnStr As String = "server=" & SName & ";uid=" & Uname &
";pwd=" & PWD & ";database= " & DName & ";"
' rest of the code will copy this strConnStr to web.config
End Sub
In the above code I am getting emptystrings in SName,UName,PWD ,DName etc....
It is sure that This code getting invoked while installing the
webapplication.
But I am getting empty string for
Me.Context.Para meters.Item("Se rverName")
So Please help me in this regard.
Thanx in advance
Yoshitha