|
Try
'Error if the user inputs some string
Dim strCode As Integer= Request.QueryString("Code")
Catch ex As Exception
Response.Write(Request.QueryString("Code"))
End Try
Something like that?
|
|
|
|
|
Thanks for the reply Paddy Boyd,
Can I able to write the varriable name which produced the error.Like
Response.Write(Request.QueryString("strCode"))
|
|
|
|
|
Why would you need to do that? You can print the error message and the stack trace - these will contain that information, but i don't think you really want to do that.
|
|
|
|
|
Suppose if am going to test the values for more that one column then i have to write this like one..
Try
'Error if the user inputs some string
Dim strCode As Integer= Request.QueryString("Code")
Catch ex As Exception
Response.Write("Invalid code")
End Try
Try
'Error if the user inputs some string
Dim strCode As Integer= Request.QueryString("Age")
Catch ex As Exception
Response.Write("Invalid Age")
End Try
Like that...
But I want to do some thing like
Try
'Error if the user inputs some string
Dim strCode As Integer= Request.QueryString("Code")
Dim strCode As Integer= Request.QueryString("Age")
Catch ex As Exception
Dim strDescription as string=String.Empty
'Check for the value generted the eror
'and assign description
Response.Write("Invalid" & strDescription )
End Try
Thank
Dana
|
|
|
|
|
Any one has some idea ?
Dana
|
|
|
|
|
can anyone help me out to integtrate payseal or provide me any sort of information regrarding how to implement it. and what r requirements for implementing it.
thanks in advance
alok tripathi
|
|
|
|
|
You should ask this on the payseal site.
|
|
|
|
|
I can set up a website with some folders requiring that users log in before being able to access the aspx pages therein using forms.authentication, and configuring web.config appropriately - all fine and dandy.
So if, say, a protected folder is "members" and someone tries to access members/index.aspx they are redirected to a login page first. Great - but if there is a pdf in that folder, say members.pdf then ANYONE can still browse directly to members/members.pdf WITHOUT being logged in.
How do I set about protecting .pdf, .doc, jpg etc files from unauthorised access in this way? Just a pointer will do.... thanks
|
|
|
|
|
Fred_Smith wrote: How do I set about protecting .pdf, .doc, jpg etc files from unauthorised access in this way?
You can write the handler and allow .pdf/.doc/.jpg etc access only through application and stop them when trying to access through browser directly.
Get it
http://www.uberasp.net/getarticle.aspx?id=13[^]
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
|
You are welcome
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
hmm... tried that, word for word, and an even simpler "hello world" type example I found elsewhere (though it was the almost identical code) - and while it compiles fine, when I try to browse to an aspx file in the app I get the error:
"Could not load type [class name] from assembly [assembly name]"
(If I browse to a jpg - one of the filetypes I'm trying to protect - it is shown as normal.)
I have tried googling this error, but have found nothing useful - just a reference to it possibly being to do with the GAC, but no help...
... I don't suppose you've got any ideas...?
cheers
Fred
|
|
|
|
|
Dear All,
I am very new to ASP.NET. Actually this is my first project.
I designed my pages and tested it on the lcoalhost and it worked will
But when I uploaded one aspx page the my host server I received a server error (shown in this link)
www.mersaal.com/home.aspx
Anybody can tell me if there are any special procedures for aspx file when published
It may be trivial problem for everybody here
Mohamed Gouda
Egypt
|
|
|
|
|
Edit your web.config to set the customerrors mode to Off, as suggested. You should then be able to see the underlying error.
|
|
|
|
|
I did so and reloaded my aspx file, but the same error appeared
Shall I upload the web.config file too
however thanks
Mohamed Gouda
Egypt
|
|
|
|
|
Yes, your site should have a web.config file.
|
|
|
|
|
Thanks a lot
I discovered my fault while trying your advice
I had to upload my dlls created in the bin dir by VisualStudion.Net
however, thanks
Mohamed Gouda
Egypt
|
|
|
|
|
I know this is a quite a general question but can anyone recommend a good website for buying an ssl certificate.
The prices appear to vary considerably across the different companies therefore its hard to choose the correct one
thanks in advance
|
|
|
|
|
i have created a menu inside a panel.the menu items are Image buttons..how can i assign a certain function for a perticular image button inside that menu??when ever i am tryng to write the code it is selecting the menu as a whole..can't select a perticular menu item...
i have creted this menu using menu control.pls help.
"I am burning...the only thing rest in me is you..."
|
|
|
|
|
If you are using the asp:Menu control then you can access the individual MenuItem 's in the OnMenuItemDataBound event.
|
|
|
|
|
CREATE PROCEDURE [dbo].[spa]
@a image
AS
insert into a(a) values(@a)
GO
table
column name = a
datatype = image
<br />
byte[] buffer=new byte[FileUpload1.FileContent.Length];<br />
byte[] b = new byte[FileUpload1.FileContent.Length];<br />
FileUpload1.PostedFile.InputStream.Read(buffer,0,buffer.Length);<br />
p[0] = objclsdb.Parameter("@a", DbType.Byte, buffer, ParameterDirection.Input);
The above code is right?
|
|
|
|
|
|
If u don;t have any idea , then y the bloody hell u r participating in the thread.
Don't waste mine and ur's time if u don;t have any idea .
|
|
|
|
|
She's not wasting your time - have you tried the code? Does it work? If it doesn't then send us an error and we can help, but we're not going to compile your code for you...
|
|
|
|
|
Every thing is provided to u , if u can't sort out even now , then shame on u, Even the stupid or duffer can understand this much elaborated code , and u r talking on behalf of her, ok , Can't u see , the code i provided , is there any thing hidden ? Everything is provided. Instead of making arguments and wasting others time , y don;t u people solve the problem, by the way , we r here to solve others problem or to speak on behalf of others and waste others time.
|
|
|
|