|
|
Hi Developers,
I am using a group of statements in Try Catch Block. When an Error occured at any line of "Try Block" control goes to "Catch Block" and skip the execution of lines coming after Error Line.
Now what I want is that "Program should start execution from line after the Error Line(Where error occurs)". I think there is some statement like Resume next is used in this case but not sure.
Thanks in advance
Lets work it Out.........!
|
|
|
|
|
the only way to do this is to wrap a try..catch around each line individually. You can also nest try..catch blocks inside a master try..catch block to handle the real critical errors
eg/
try
try
' something error-prone
catch MySpecificException ex
' do something
catch MyCriticalException ex
throw
try
' something else error-prone
catch MySpecificException ex
' do something
catch MyCriticalException ex
throw
catch MyCriticalException ex
' handle critical exception
|
|
|
|
|
Hi J4amieC
Thanks a lot for your help. Would U b so kind to tell me a little about the Flow of the code u sent to me.
Thanks
Lets work it Out.........!
|
|
|
|
|
The flow of try catch block is when your code in try block occurs an error, it will do something in catch block. After that it will do something after catch block. So that:
SqlConnection connection = new SqlConnection( "ConnectionString" );
SqlCommand cmd = new SqlCommand( "CommandText", connection );
try {
connection.Open();
cmd.ExecuteNoneQuery();
}
catch {
}
now you put each line in try block in try catch block like that:
try {
try {
connection.Open();
} catch {
}
try {
cmd.ExecuteNoneQuery();
} catch {
}
}
catch {
}
Do you understand now?
|
|
|
|
|
I m building an application in which I redirect the user to a particular page. In the Page Load event of the that page , I assign a variable some value. Then I call the Button click event on that page. I have applied the !IsPostBack so that the Page Load event does not occur on clicking the button. Now the problem is that I want to use the value of that variable which i was population on Page Load event.
Can I use that variable as static?
I have a doubt in my mind that as I am simply redirecting the users to that page, the value of that variable could be set to some another value if another user is redirected to that page as the variable is static. Please help me to clarify my concept.
Thanks,
Sandy
|
|
|
|
|
hi,
if u want to access that variable on post back u have to define that variable as static .
bye
|
|
|
|
|
The problem is that all visitors share the same static variable...
---
b { font-weight: normal; }
|
|
|
|
|
Can I store that variable in View state to remove this problem? because I don't
want to share the variable between different users.
Thanks,
Sandy Sekhon
|
|
|
|
|
Yes.
---
b { font-weight: normal; }
|
|
|
|
|
hi,
i want to install community starter kit. But database is not getting converted due to some error like incorrect syntax near function while copying files in community database.
please tell me how to install community starter kit clearly so that i will move further to make cd based database application of asp.net
Vijayendra Shinde.
-- modified at 5:33 Friday 21st April, 2006
|
|
|
|
|
we are using microsoft Office 9.0 Library & COM namespace is OWC
TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1];
While writting this code it is not converting to object to string but in reverse case it is working properly uploading to spreadsheet.
//This is the Error
Error: <b>Cannot convert Object to String </b>
So pls convey this & let me know the solution for the above problem.
I m using asp.net with c# coding.
Thanking u,
Naren.
Pls let me Know
|
|
|
|
|
Could try:
TextBox1.Text = (string)xlsheet.ActiveSheet.Cells[i,1];
or
TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1].ToString();
|
|
|
|
|
Hi
I have an application which uploads Photos It is working fine
But when i try to uplod a Zip folder it is giving
Page can'nt display
Help me
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
|
Thx for reply
If i want upload a 10MB Zip file what settings i have to change
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
|
hi all,
how can i trace and debug the java script file using visual studio 2005
coolsweety
|
|
|
|
|
|
Use the keyword
debugger
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshers
http://himabinduvejella.blogspot.com
|
|
|
|
|
|
Hi all. I am building a crystal report in pdf. It's working fine but, When I click on a button to display the report, the report is opened in the same window. How can I open it in other window?
the code i am using for displaying it is as follows:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim report As New Doctormaster
Dim ms As System.IO.MemoryStream
ms = CType(report.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
Response.ClearHeaders()
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Try
Response.BinaryWrite(ms.ToArray)
Response.End()
Catch err As Exception
Response.Write("< BR >")
Response.Write(err.Message.ToString)
End Try
End Sub
Please help me out.
|
|
|
|
|
|
Hi,
Help me To create a new folder on server machine when I click a button on .aspx page
Thanking you,
Balu
|
|
|
|
|
Look at the System.IO.Directory.CreateDirectory method.
---
b { font-weight: normal; }
|
|
|
|