|
Hi
In my Web Form, I have this code:
<code><HEAD>
<title id="title" runat="server"></title>
</Head></code>
Then in the code-behind file, I set the title of the page dynamically.
My problem is that sometimes, my web form deletes <b>runat="server"</b> property from the <title> tag automatically. Because it deletes the <b>runat </b>property, my page stops working. I manually have to add <b>runat="server"</b> into the <title> again.
So please tell how I can solve this problem.
Thanks
|
|
|
|
|
Just do this in the code behind:
<br />
this.Page.Title = "Your Title Here";<br />
|
|
|
|
|
Or you could do this:
<head>
<title><%= pageTitle %></title>
<head>
and in your codebehind define pageTitle as protected and assign it in the Page_Load event: pageTitle = "the title of my page";
regards,
Mircea
<small>Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.</small>
|
|
|
|
|
Any one please help me to add context menu to a table row. And the menu should not come when right clicking other parts of the page.
|
|
|
|
|
|
Why is it necessary to implement try catches in your source code when there is already page-level and application-level error handling? To me it sounds a bit redundant.
In the page-level and application-level error handling I log the errors (and InnerExceptions) in the DB, email and the event logger.
Thanks
Fuze
|
|
|
|
|
It is good practice to handle exceptions as close to the source as possible. This gives you the opportunity to handle the exception in an intelligent way and resume work if appropriate. If you wait to catch it at the page or applicaiton level it may be too late.
|
|
|
|
|
|
Colin Angus Mackay wrote: writing code that is too defensive and that can actually hide bugs
Agreed. As with anything the trick is know when and how to use the tools you have. What I meant was not to just bubble the exception back up the call stack when it can be handled at the source, especially in the case of a class library. If I can recover from an exception in my library I don't want to make it the responsibility of the calling application.
|
|
|
|
|
Lets say if you accessing a webservice to retrieve party information and that causes an exception what is the most logical thing to do once it is caught? Im logging them at page and application level. Do I just revert the customer back to that same page where the error occurred and lot it or do I transfer the user back to the homepage and log it. Excuse my ignorance Im a novice with regard to error handling. Thank you
Fuze
|
|
|
|
|
How you handle it depends on the application. Without know how your app is desinged to function I would say to return the user to the page with some message indicating what has happened, i.e "Invalid data", "No record found", etc. Give them a chance to correct any entries. If there is nothing for them to correct, then possibly it would be appropriate to return the to the home page.
|
|
|
|
|
|
|
With the try/catch exception handling you can provide 'alternate' solutions to any problem that you anticipate in advance... for example, if the db connection fails, or if the page dosn't load, etc. you can do something else for the user so that they don't see some error page or message... my 2-cents
Nila Fridley
|
|
|
|
|
i want to pass a string from server side to the client side.
can anyone help me by doing so by xmlHttp Object in javscripting.
I had converted the string on server side to xml data first .
string strServerTime;
strServerTime = DateTime.Now.ToString();
strServerTime = "<?xml version='1.0'?><serverTime><time> " + strServerTime + " </time></serverTime>";
StringReader sr = new StringReader(strServerTime);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(sr);
return xmlDoc;
and returned this object to client side .
on client side i had used xmlHttp.responseXML .but now i am not being able to
extract the child node to get the server time value.
can anyone please help me in this. its toooo urgent .
-- modified at 7:39 Wednesday 19th July, 2006
|
|
|
|
|
instead of loading into an xmldoc ,
append it to a string and write it to response like
Response.Write(string)
you can handle the responsetext
as
responsetext[0]
madhumathi.J
|
|
|
|
|
its ok but how to retrieve it on client side that is in javascripting. 
|
|
|
|
|
i want to put the calendar in my asp page but in our toolbox have but that is not suitable for web site,is there a tool it's like button or someting when we click that button it should display the calendar(Web Calander).Can anyone help for this pls.
Thank u
|
|
|
|
|
You can search for some javascript calenders in google. It will server the purpose for you.
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
What is this error and what should i do,pls help me? (I have VS.net 2003)
VS.Net has detected that the web server is running asp.net version 1.0.The web application you are creating or opening can be configured to be compliant with asp.net 1.0.
However, the application will not be able to use new features from asp.net 1.1.
|
|
|
|
|
You could install the .net framework 1.1...
The project you are opening must have been created under 1.1. For some reason you only have 1.0 on your machine. If you do have 1.1 installed, you may just need to register it with IIS.
|
|
|
|
|
Thank you for help.
I have installed the IIS server but i need to upgrade into 1.1 as u think so how can i upgrade .net framework 1.0 into version 1.1.
Thank you
|
|
|
|
|
You should be able to get it through microsoft update.
|
|
|
|
|
Hi
Sometimes, I get the following problem:
I create WebForms in VS.net.
I drag & drop a button on the WebForm. Then I double click it to write the event code in the code-behind file.
Then I test the button event on localhost and it works.
Then I deploy the project on a Live shared server. I click on the same button, and nothing happens.
If I include the onclick= "Button1_Click" to the html code , then the button event works on both: localserver & live server.
So please tell me why I get this problem for some Button controls and how I get solve this problem ?
(As I said I dont get this problem all the time)
|
|
|
|