|
Thanks for you reply. Now, I change the Code:
Try
'call the ValidateLogin function
If ValidateUser(txtLoginId.Value.ToUpper, txtPassword.Value.ToUpper) Then
If Request.Params("ReturnUrl") <> "" Then
FormsAuthentication.RedirectFromLoginPage(txtLoginId.Value, True)
Else
If iStatus = 1 Then
Response.Redirect("EntrySubscriberDtls.aspx")
Else
Response.Redirect("ViewSubscriberDtls.aspx")
End If
End If
Else
Response.Redirect("VendorLogin.aspx", True)
lblErrorMsg.Text = "Invalid UserName or Password"
End If
Catch ex As Exception
'Throw error Message
lblErrorMsg.Text = ex.Message
End Try
--------------------------
In Both Case: Error is:"Thread was being aborted."
I am Using Backend code VB.NET and ASP.NET 1.1
Mohan Balal
|
|
|
|
|
As I said before, you have to catch System.Threading.ThreadAbortException. ThreadAbortException is thrown exactly after you do a Response.Redirect. This is normal and it's because the .NET-Framework informs itself that the current thread is beeing aborted. Your problem was that you generally catch every type of exception. Instead you must catch the ThreadAbortException BEFORE you catch any other Exception types. Before you go on, take a look on the documentation of "System.Threading.ThreadAbortException", afterwards it will be clear why you get the message "Thread was being aborted."
so change your code to this:
Try
'call the ValidateLogin function
If ValidateUser(txtLoginId.Value.ToUpper, txtPassword.Value.ToUpper) Then
If Request.Params("ReturnUrl") <> "" Then
FormsAuthentication.RedirectFromLoginPage(txtLoginId.Value, True)
Else
If iStatus = 1 Then
Response.Redirect("EntrySubscriberDtls.aspx")
Else
Response.Redirect("ViewSubscriberDtls.aspx")
End If
End If
Else
Response.Redirect("VendorLogin.aspx", True)
lblErrorMsg.Text = "Invalid UserName or Password"
End If
Catch ex as System.Threading.ThreadAbortException
' Do nothing here, just catch the exception
Catch ex As Exception
'Throw error Message
lblErrorMsg.Text = ex.Message
End Try
hope that helps
- walter
|
|
|
|
|
Web service security is implemented using WSE 2.0 credential passing technique or just block the anonymous access and enabled Integrated Window Authentication. In case of WSE i don't need custom UsernameTokenManager.
Can any one help me to find out the differences between two.
I don't want to allow user acces the web service through URL.
Thanks
Lokesh
|
|
|
|
|
I have tried to copy the contorl from the tab to the form , the following message is displayed
"Control cannot be created because Visual Studio cannot find the control's type in the contorl assembly"
I have tried to replace the DLL , but the control cannot be copied to the form.
Kindly help me out.
Thanx
Ali
|
|
|
|
|
Hi All,
I need to write a query in which date time field is there.I want to display only date either in dd/mm/yyyy or mm/dd/yyyy. I am not getting year in yyyy
I am doing this:
SELECT Convert(nvarchar,ReceivedDate, 6) AS ReceivedDateFromClient FROM Table
Its results in 01 Jan 00.
But I want 01 Jan 2000.
Can any one help me please...
Thanks in advance...
|
|
|
|
|
Learning ASP.NET 2.0 wrote: I am doing this:
SELECT Convert(nvarchar,ReceivedDate, 6) AS ReceivedDateFromClient FROM Table
u have to write this
SELECT Convert(nvarchar,ReceivedDate, 101) AS ReceivedDateFromClient FROM Table
Thanks,
Sun Rays
|
|
|
|
|
Thank you, its working.Thanks
|
|
|
|
|
FYI,
SELECT Convert(nvarchar(11),ReceivedDate, 113) AS ReceivedDateFromClient FROM Table
Regards,
Raghu.
|
|
|
|
|
Thank you Raghu, its working.Thanks
|
|
|
|
|
try this
select left(ReceivedDate,11) AS ReceivedDateFromClient FROM Table
Shahzad Aslam
Sofware Engineer
|
|
|
|
|
Hi..
I have problem to create a multi-line grid with including Textbox and Dropdownlist items.pls,give me some idea's and sample codes.
Thanks...
vns
|
|
|
|
|
hi,
for that u have to include template column in gridview and add textbox and dropdown to those template fields..
Thanks,
Sun Rays
|
|
|
|
|
hi to all
We developed a e-commerce web site.Its almost finished and we are trying to connect it to Paypal. How to connect, any one can help
Sunil Tvl
|
|
|
|
|
|
Use paypal sandbox to do the testing
|
|
|
|
|
one of my many task is to maintain my company website along with my other software development. and i cam constantly given data to put on the website which keeps interrupting my other duties i found away to let a applet read from a text file a scroll up like a flash using a javascript what i wanted to know is there are a way that i can whether via javascript read the contents of a word document a displaying it on screen? because i keep on have having to create new pages from my template blank page hence i wanted to further automate the process by making it simply reading from a word document. but i am not sure where to look any one has any idea
kenny
|
|
|
|
|
|
Hi, Is there a way to bind Bitmap objects to a GridView's ImageField or TemplateField? I've tried to use an HTML Image in a TemplateField, but i wasn't able to bind the HTML Image to my DataSource.
If it is too much hassle, or a wrong approach; how else can i bind 'binary' images stored in my database to a GridView?
Any help would be much appreciated.
This is the code i'm using to retreive the Images from the SQL Database:
//Populate the DataTable with the result of the SELECT query using some function.
DataTable Advertisements = data.ExecuteCommandToList(Command);
for (int i = 0; i < Advertisements.Rows.Count; ++i)
{
if(Advertisements.Rows[i].ItemArray[0] != DBNull.Value)
{
byte[] BinaryThumbnail = (byte[])Advertisements.Rows[i].ItemArray[0];
MemoryStream ThumbnailMemoryStream = new MemoryStream();
ThumbnailMemoryStream.Write(BinaryThumbnail, 0, BinaryThumbnail.Length);
Bitmap Thumbnail = new Bitmap(ThumbnailMemoryStream);
ThumbnailMemoryStream.Close();
Advertisements.Rows[i].ItemArray[0] = Thumbnail;
}
}
|
|
|
|
|
Hi, Is there a way to bind Bitmap objects to a GridView's ImageField or TemplateField? I've tried to use an HTML Image in a TemplateField, but i wasn't able to bind the HTML Image to my DataSource.
If it is too much hassle, or a wrong approach; how else can i bind "binary" images stored in my database to a GridView?
Any help would be much appreciated.
This is the code i'm using to retreive the Images from the SQL Database:
//Populate the DataTable with the result of the SELECT query using some function.
DataTable Advertisements = data.ExecuteCommandToList(Command);
for (int i = 0; i < Advertisements.Rows.Count; ++i)
{
if(Advertisements.Rows[i].ItemArray[0] != DBNull.Value)
{
byte[] BinaryThumbnail = (byte[])Advertisements.Rows[i].ItemArray[0];
MemoryStream ThumbnailMemoryStream = new MemoryStream();
ThumbnailMemoryStream.Write(BinaryThumbnail, 0, BinaryThumbnail.Length);
Bitmap Thumbnail = new Bitmap(ThumbnailMemoryStream);
ThumbnailMemoryStream.Close();
Advertisements.Rows[i].ItemArray[0] = Thumbnail;
}
}
|
|
|
|
|
I am developing a login and registration page and I would like to use ASP.net(in visual studio) and dreamweaver 8 for the design but not sure if this can be done. Can someone tell me if this is possible and is it hard to do?
Thanks
|
|
|
|
|
Dreamweaver is going to generate html code for you. If you site doesn't have functionality like gridviews or datagrids and is mostly static html then yes you can use dream weaver to create the html. Take that html and put it in the html view of your aspx page.
Hope that helps.
Ben
|
|
|
|
|
thanks for the reply but I was hoping to create pages with each softgware and have them interact but you can't do that. I just downloaded MS visual web developer and this might be something I could migrate over to from DW to do what I want.
|
|
|
|
|
I have added a section (named 'preliminaryQuoteGeneratorConfiguration') decleration and definition to the web.config file. But when i build the solution it gives me the following error:
Section or group name 'preliminaryQuoteGeneratorConfiguration' is already defined. Updates to this may only occur at the configuration level where is defined. (F:\...\TestWebSite\Web\web.config line 12)
even though it is declared and defined within this file (web.config) only.
Please help me in this regard.
Thanks!
|
|
|
|
|
When you define your own config section you need to add it to the
<configSections> of your web.config file. Something like:
<section name="environmentConfiguration"
type="ConfigIt.KeyValueConfigurationSection, ConfigIt"/>
That error sounds like the section has been added twice in the configSections group.
Hope that helps.
Ben
|
|
|
|
|
Thanks!
I have ensured the single entry of section decleration and definition.
The problem occured when one my project coworker backed up the old version of web application and created copy for changes. He created a folder on my local system and bound it to source project.
It works ok on his system and other member's system but fails with mine one.
Thanks!
|
|
|
|