Create a Uri object with your stored string. Then access the Host property. Example: Uri url = new Uri("http://www.codeproject.com"); string domainName = url.Host;
Ryan Bost
Create a Uri object with your stored string. Then access the Host property. Example: Uri url = new Uri("http://www.codeproject.com"); string domainName = url.Host;
Ryan Bost
You didn't provide what type of database you are using, so I can't provide you with syntax. But I will provide you with the logic you need. There is no need to perform the insert of the image record before the postback and the following record after the postback. You can perform both inserts prior to the postback. When you first submit the form, insert the image record into the database. You should return an output parameter containing the primary key of the newly added image record from the SQL code. Grab this value with your .NET code. Then perform an insert to the pagecontent table supplying the retrieved value as an input parameter. NOTE: You will probably want to (eventually) encompass both insert statements within a transaction so that they both succeed or both fail, but that is an entirely different discussion. Hope this helps. If not, supply some more information (i.e. .NET language C#/VB, database type SQL Server/Access/etc, database table structures, or post your code). Good luck. Ryan Bost http://www.sugarcoding.com
I have seen this same issue. However, in our case, it requires a manual recycle of the aspnet_wp.exe process. Our configuration is the same as yours (W2k server, IIS 5.0, and .NET 1.1), except we are not running Crystal. (You probably didn't want to hear that :-O ) Unfortunately, I do not have a resolution for you. But hopefully the configuration comparison will help and the knowledge that you are not the only one experiencing the issue will provide a little bit of comfort. Ryan Bost http://www.sugarcoding.com
I completely agree with Christian in that you will have to test/support this in different browsers. I supplied some code that was tested in IE 6. Christian suggested clearing the text in the span (setting innerText to ""). However, I just hid the text that was there in case it needed to be displayed later. function hideText() { document.getElementById("TextToHide").style.display = "none"; } function runHideTextTimer() { window.setTimeout('hideText()', 3000) } Here is the text you want to hide. Hope this helps. Ryan Bost http://www.sugarcoding.com
Take your own advice. Develop and test on your local machine. When you get the project where you want it, push it to your server. Then re-test. This is the approach I use and I have never had any issues with it. Plus, accessing the files locally is faster than accessing them remotely. Hope that helps. Ryan Bost http://www.sugarcoding.com
Sorry Mazhar... ...try this instead... your_amount.Text = (a/b).ToString(); Ryan Bost http://www.sugarcoding.com
If you are attempting to divide a by b and supply it to the your_amount textbox, then use the following code (your code modified).... int a = int.Parse(total_fee.Text); int b = int.Parse(c_length.Text); your_amount.Text = (string)(a/b); If you want to make sure your code accomodates when c_length is zero, then use the following code... int a = int.Parse(total_fee.Text); int b = int.Parse(c_length.Text); your_amount.Text = b==0 ? 0 : (string)(a/b); Ryan Bost http://www.sugarcoding.com
Don't use " " Just add the value with a space in it. System.Web.UI.WebControls.ListItem li = new System.Web.UI.WebControls.ListItem("Ant Eater", "Ant Eater"); DropDownList1.Items.Add(li);