|
i am using following code but its not working
Protected override void OnAfterInstall(IDictionary savedState)
{
//base.OnAfterInstall(savedState);
string server = this.Context.Parameters["DATASOURCE"];
MessageBox.Show(server);
string userId = this.Context.Parameters["USERID"];
MessageBox.Show(userId);
string password = this.Context.Parameters["PASSWORD"];
MessageBox.Show(password);
//string newConnectionString = "User Id=" + userId + ";Password= " + password + ";Data Source =" + server + ";";
string newConnectionString = "Provider=SQLOLEDB.1;User Id=" + userId + ";Password=" + password + ";Data Source=" + server + ";";
string xmlConfigFile = "";
xmlConfigFile = Context.Parameters["INSTALLDIR"] + "web.config";
UpdateConfigFile(xmlConfigFile, newConnectionString, "wfMasterConStr");
MessageBox.Show("Updated");
}
|
|
|
|
|
rajkumar.3 wrote: string newConnectionString = "Provider=SQLOLEDB.1;User Id=" + userId + ";Password=" + password + ";Data Source=" + server + ";";
Just one suggestion Raj kumar, If this is your final/ production code, Please be aware of SQL Injection
BTW : "Re: dont be smart Vuyiswa Maseko" what was the reason to write this subject and why did you change that ?.
|
|
|
|
|
|
rajkumar.3 wrote: i already wrote this piece of code but its not working. every thing cant be explain to u better u can concentrate on ur own business
Don't be rude. If this is your attitude, I am sure you are not going to get any replies.
Good luck!
|
|
|
|
|
yeah i am sorry i was bit confused with that persons signature .. there is a link in his signature ...
in fact i am bit hurry in finishing this task ..
|
|
|
|
|
lol so you thought my Signature was referring to you ?
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
This can be done by WebConfigurationManager Class . WAT also using the same class for its operation .
Here[^] is some example. I believe you can now go ahead !!
|
|
|
|
|
i need to update the connection string when istallation wizard is running by taking the data source name , userid and pwd ... .. .. its like before installation event or after installation event ...how to use these events ?
|
|
|
|
|
abhijit can i have ur email so that i can send u my sample application if r intrusted in solving this ...
|
|
|
|
|
it is given in my profile.
|
|
|
|
|
when you will create web setup project , you can have option of creation UI. on that time take the connection string , userid and password and set that as I say earlier.
|
|
|
|
|
|
Satish - Developer wrote: Line 12: using Common;
What is common? is this any dll.have you added it as reference?
Cheers!!
Brij
|
|
|
|
|
|
Did you host your Web Application on IIS?
|
|
|
|
|
I was using the UpdateProgress bar control of Ajax as in this site. The control is working fine.
I require one more help on this. Can I do some formatting for the progress template like font styles? Is it possible? I couldn't find any cssclass properties.
can anybody pls provide any help on this?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
meeram395 wrote: Can I do some formatting for the progress template like font styles? Is it possible? I couldn't find any cssclass properties.
Why you are not creating custom gif and put the same over there ?
|
|
|
|
|
<asp:updateprogress id="UpdateProgres1" runat="server" associatedupdatepanelid="UpdatePanel1">
<progresstemplate>
Wait...
</progresstemplate>
</asp:updateprogress>
Here if you know css and all. you can code any HTML you want instead of "Wait..."
Or simply put an animated .gif to show some progress is going on.
|
|
|
|
|
Thanks a lot.. I know css and will do that.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Hello Friends!
Actually I have a page which contain record in a grid view. I want to put the button. after clicking the button that details available on grid view will be exactly appeard on next page.
please solve it.
thanx
|
|
|
|
|
If the data is not so much heavy , just put the data in a session variable and retrieve it on other pages .
|
|
|
|
|
The obvious way to do this is to make both pages controls and then let viewstate handle it.
Of course, if all you want is for the second page to show the data of a grid view row, and nothing else, then just link to a page with an id in the URL that you use to pull the data from the DB.
This is ASP.NET 101, so I hope you're a beginner doing a course and not being paid for your work.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
there are several ways to achieve this using sessions,querystrings
and gridview built in hyperlink field add it and give destination url
your selected row values will be passed to next page automatically in the form of querystring.
umerumerumer
|
|
|
|
|
thanx a lot:
Actually It is first to me to use session or query string
so, i couldn't get what am i do. If ppssible ,then please guide me through some code or guidance
|
|
|
|
|