|
If i used the Try..Catch..Finally..End Try in my asp.net, how do i display the error that may occur in the process
t.aransiola
|
|
|
|
|
eg:
try
'
catch ex as exception
litEx.Text = ex.Message
end try
...
<asp:Literal runat="server" id="litEx" />
fred
|
|
|
|
|
aransiola wrote: If i used the Try..Catch..Finally..End Try in my asp.net, how do i display the error that may occur in the process
You shouldn't display it. It gives potentially dangerous information to people who might want to attack your site. You should log it and display a generic message that doesn't mean anything. If you need people to report what they were doing when an error occurred, generate a GUID to put on the generic message and attach it to the log entry for the actual error.
|
|
|
|
|
Dim SQLString As String = "select * from myTable where ProductID='" & txtProduct.text.trim & "'"
txtproduct is a textbox in my form
ProductID is a Character Field in myTable
Anytime i entered a numeric value in the textfield, the query works fine without any problem
but if i entered alphanumeric value in teh textbox like A1000, it throws the error
"Input string not in the correct format"
any help will be appreciated
t.aransiola
|
|
|
|
|
IS the SQL column an integer by any chance?
Brad
Australian
-CAUTION-
The previous statement may contain traces of PHP, and by reading this statement you negate the right to vote me down.
|
|
|
|
|
can i use history object like this in javascript
window.history.go('http://www.google.com')
becoz syntax in tutorial is
"
The go() method loads a specific page in the history list.
Syntax
history.go(number|URL)
"
Chohan
Chohan
|
|
|
|
|
You can use both. See here.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
here is my code but only "window.history.go(-1)" works. on onclick event of button.
Note:when i posted msg onclick replace with removed.so insted of removed here is onclick in code
function gone()
{
window.history.go(-1)
//window.history.go('http://www.google.com')
//Go to nearest URL in history list with "javascriptkit.com" in the URL.
}
Chohan
|
|
|
|
|
Is there more than one page in your history?
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
yeah .first i opend google page in browser then my on page.but it didnt open google page again when i click on button
Chohan
|
|
|
|
|
Try changing window.history.go(-1) to window.history.go(-2) .
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
oh no.i dont wana give here number.-2 will also work.but i want to give here any "url".plz see the lines which are in comments in code
Chohan
|
|
|
|
|
Then you might want to use some thing like this:
<form>
<input type=button value="Back" onCLick="history.back()">
</form>
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
How about doing his the normal way and have:
document.location = "http://google.com";
Brad
Australian
-CAUTION-
The previous statement may contain traces of PHP, and by reading this statement you negate the right to vote me down.
|
|
|
|
|
I have one big hTML page say a.htm and 10 menus in home page.
I want on click of different menus user focus should move to different headers of a.htm page.
Please share some code sample
Amit
Amit
|
|
|
|
|
Please specify what you mean by headers.
Brad
Australian
-CAUTION-
The previous statement may contain traces of PHP, and by reading this statement you negate the right to vote me down.
|
|
|
|
|
Ok let me explain in more better way.....
I have one Html Page like
Company History
<lot of details>
Company Mgt
<lot of details>
Company Locations
<lot of details>
so on....
Now in my home page i have one menu for each header i.e. Company History,
Company Mgt, Company Locations and so on...
I want to build only one html page for all abovve and depending upon user choice from menu selection, my html page should start from there......I don't worry if user scroll other sections also. Requiremnt is on click of menu focus should goto specific header of html page.
Please let me know in case still you are not clear with my query....
Amit
|
|
|
|
|
OK you should use a page jump here.
Type this in the html above Company History:
<a name="CompanyHistory">
Then when you call the page you pass that param to the browser.
Example:
<a href="http://example.com/mypage.html#CompanyHistory">
Brad
Australian
-CAUTION-
The previous statement may contain traces of PHP, and by reading this statement you negate the right to vote me down.
|
|
|
|
|
Thanks...I will try and test this. Happy new year to you and all other members of this site.
Amit
|
|
|
|
|
Hi all,
I want to put an download link, when viwer click on the clink the relavent file has to be download. I dnt want to manage the file in zip format. If the user uploades the file as document, he can able to download the same file in document format and save in the local system.
Plz any one suggest me..............
Thanks in advance
Bye
Know is Drop, Unknown is Ocean
|
|
|
|
|
what language are you using?
webProgrammer
|
|
|
|
|
Hi,
I want to create menu control for asp.net application. I tried to use asp.net 2 menu control, but it is not working properly, ie, it shows parentMenuName only and in the case of sub menu it shows "SubMenuName". And I am not able to hide sub menu during page load.
My xml file is
<?xml version="1.0" encoding="utf-8" ?>
<RootElements>
<ParentMenuName Name="Registration" ParentMenuId="1.1" URL="www.msn.com">
<SubMenuName Name="Agreement" SubMenuId="1.1.1" URL="www"></SubMenuName>
<SubMenuName Name="Personal" SubMenuId="1.1.2" URL="www" ></SubMenuName>
</ParentMenuName>
<ParentMenuName Name="News" ParentMenuId="1.2" URL="www.msn.com">
<SubMenuName Name="CNews" SubMenuId="1.2.1" URL="www"></SubMenuName>
</ParentMenuName>
</RootElements>
That is***************
* Registraion * During loading i want to show Registratin and News
* Agreement * only. If I click Registration it expand and shows
* Personal * the sub menu, ie, shows Agreement & Personal
* News * and vice versa.
* CNews *
******************
Can i do this using Asp:Menu control?.
Which is better one using Asp:Menu control or using JavaScript.
Please suggest me. If any sample application please send to me.
Regards,
Maxi
Maxi
|
|
|
|
|
how to declare static variable in javascript code in html tag.
|
|
|
|
|
Declare with 'ClassName.variableName' or 'ClassName.functionName'. Can be changed by any function or method. This method is rarely used.
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|
|
Hi
I need help regarding web and excel
Let me say about me I am not a programmer , I have interest in web design
My problem
I am trying to make a web page to store my books and cd dvd collection
Every is fine my question is
When I enter data in web page it should be stored in excel in a particular cell
Ex
Cd/dvd menu
English
srno-----Title---- cd / dvd-----action/com
1-------film name ----dvd-------action
as I enter this data in web this should be saved in excel
twith out any server because I want to use this any where with out any problem
if there is any other method please let me know
thanks
ramu
|
|
|
|