|
Hi
I created website in ASP.NET 2.0 and MYSQL.
MYSQL data base is at remore server. I can connected to MySQL successfully but when I upload my site to Share hosting, it throws following error.
I think ,On my local m/c I have installed MYSQL management tool so I can connect successfully but on shared hosting, it may not so this error is coming,
Any clue how can we enable our remote shared host to connect to MYSQL.
[MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.]
MySql.Data.MySqlClient.NativeDriver.Open() +1142
MySql.Data.MySqlClient.Driver.Open() +69
MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +89
MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() +11
MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +257
MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +117
MySql.Data.MySqlClient.MySqlPool.GetConnection() +113
MySql.Data.MySqlClient.MySqlConnection.Open() +309
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +31
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +112
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
ASP.test_aspx.getuser() in d:\hosting\5454799\html\Testing\test.aspx:25
ASP.test_aspx.Page_Load(Object sender, EventArgs e) in d:\hosting\5454799\html\Testing\test.aspx:12
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesA
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
how to determine which update panel cause partial postback if i have 2 or 3 update panel. i want to determine this from javascript and server side also. please help me with sample code.
tbhattacharjee
|
|
|
|
|
THIS[^] article is based on to find out which control made postback to page. You might get some hints out of it.
Regards,
Hiren.
Microsoft Dynamics CRM
"A SQL query goes into a bar, walks up to two tables and asks, "Can I join you?", "yes naturally""
|
|
|
|
|
hi all,
I am having a simple web application.In it there i a link got online payment(a link is for some bank login).After clicking on that link u will be redirected to a some xxx bank.After finishing the successful transaction what will be the process for redirecting to our web application ?
Thanks in advance.
|
|
|
|
|
So far I have found PayPal Sample[^], There's a lot of code written for each step. At last you will find a logic on redirecting back to your webpage after completing transaction. I think There's same idea as in page for all transactional websites.
Regards,
Hiren.
Microsoft Dynamics CRM
"A SQL query goes into a bar, walks up to two tables and asks, "Can I join you?", "yes naturally""
|
|
|
|
|
|
An observation and a bit of a question:
I've got a DropDownList on a web page (C#, but that doesn't matter)
It is set to AutoPostback & ViewState is turned on.
IF there are duplicate Values in the dropdown (not the Text, just the Values), it will NOT maintain its selected index, but rather return from the postback with the first of the duplicate Values selected.
Example: This is what it looks like after a postback from selecting "CHAPLAIN"
<option value="TBD">ACQUIS & MATERIEL MGMT</option>
<option value="xxxxxxHolliT">AMBULATORY CARE</option>
<option value="xxxxxxBrownJ">ANESTHESIOLOGY</option>
<option selected="selected" value="TBD">ASSOC DIR/NURSING SVC</option>
<option value="TBD">ASST DIR/OPERATIONS</option>
<option value="xxxxxxWackeR1">BLIND REHABILITATION SVC</option>
<option value="TBD">CHAPLAIN</option>
<option value="TBD">CHIEF OF STAFF</option>
See what I mean?
Is this a known behavior? Or a bug?
|
|
|
|
|
AFAIK its know behavior. Selected status is stored based on the value not the ordinal, hence the SelectedValue property. With duplicate values it just picks the first one as you can see. It just doesn't make sense to have the same values for multiple items.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: It just doesn't make sense to have the same values for multiple items.
Sure it does, in circumstances a DropDownList is apparently no good for.
For instance, a list of Names, with their gender in the Value.
It's the other way around that wouldn't make sense. A list of 47 Bobs...you wouldn't know which one to pick even if their Values were different.
But Bob Smith, Bob Dobbs, Bob1 and Bob2 could all be male in Value.
No matter. I found a diffent way of doing what I was doing.
|
|
|
|
|
It simply means you are using the value field for something that it isn't intended to be. The value field meant in theory to be used like the key in a hashlist or the primary key in a table. If you have another value that you'll need, you can always add a custom attribute to each ListItem, but at the end of the day a single-selectable item control should have unique ids for each item...
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
GenJerDan wrote: For instance, a list of Names, with their gender in the Value.
Then I wouldn't use a DropDownList
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i want to submit form in asp.net
I think that form object can be stored in formS variable by using "var formS = document.getElementById("form2")"
but i don't know how can i submit.
/////////////////////////////////////////////////////
function show_win(userName) {
var formS = document.getElementById("form2");
formS.action(); //<-- Here is error.
}
<asp:textbox id="TextBox1" runat="server">
<asp:button id="Button1" runat="server" text="Button" onclientclick="show_win('admin')">
|
|
|
|
|
formS.submit() should do the trick for you!
Cheers!
|
|
|
|
|
Hi,
I want to ask where is the best place to save the web application version? because i want to show the version on my default page but I thought if there is a specific place to save other than Global file?
Thanks
|
|
|
|
|
Probably in web.cofig as It's not accessible from outside.
Regards,
Hiren.
Microsoft Dynamics CRM
"The difference between the impossible and the possible lies in a person's determination" - Tommy Lasorda
|
|
|
|
|
As Hiren suggested, you can save it in web.config . I have several projects (small as well big) saving it in config file.
|
|
|
|
|
Place it in web.config in app settings section. Then you will be able to read it easily in code like
ConfigurationManager.AppSettings["YourApplicationName:VersionInfo"]
I Web Development Free Lancer
Share your experience with others
Check my Blog...
|
|
|
|
|
If I have the following url currenty on my page?
http://www.JassimRahma.com/url/abc/database.aspx?id=345&cur=654
how can I determine the page name from my code to get:
database
Thanks
|
|
|
|
|
string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath;
System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath);
string sRet = oInfo.Name;
return sRet;
Regards,
Hiren.
Microsoft Dynamics CRM
"The difference between the impossible and the possible lies in a person's determination" - Tommy Lasorda
|
|
|
|
|
Hi,
I am developing a simple online DBMS to browse my database online.... the main concern for me is to clear everything from the PC when the user disconnect so no body can go and click (Back) on the browser and see the pages if the user forgot to close it.. what I have done so far is :
Session.RemoveAll();
Response.Clear();
Response.Redirect("Default.aspx");
I am sure this is not enough.. am I right? so what else I should include there?
|
|
|
|
|
Q. What if the user hits CTRL+A, CTRL+C and then CTRL+V in notepad and forgets to close that?
A. It is there own stupid fault if others see the data
Where and when is your example code being called?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
musefan wrote: Where and when is your example code being called?
What is wrong with that question that gets a vote of 1?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
You need to clear the cache too. Refer this[^]
thatraja |Chennai|India|
Brainbench certifications Down-votes are like kid's kisses don't reject it Do what you want quickly because the Doomsday on 2012
|
|
|
|
|
You should really abandon the session rather than just remove all of the contents. The response.clear and redirect don't do anything to get rid of the history. You need to be looking more at the cache.
If you do everything in update panels or with other ajax methods, then the back button won't do much.
|
|
|
|
|
in UPS site there is a login button. when user click on a login button then a popup appear. so i want to design a div or iframe having save look & feel. the site url is http://www.ups.com[^].
please someone go there and help me to design same look and feel div.
thanks
tbhattacharjee
|
|
|
|