Showing posts with label solution. Show all posts
Showing posts with label solution. Show all posts

Thursday, March 29, 2012

Please click the back button on your browser and

Hi All,

In my one project, at many aspx pages I am getting below error.
Could anyone please give me solution of this.
================
Please click the back button on your browser and try again.Session state is
not available in this context.
================
I really tried to solve this a lot but could not get the solution.

Thanking you in advance,
RahulSeems sessions are disabled for your application and being used everywhere
inside applications...

Sudhakar Sadasivuni
http://weblogs.asp.net/ssadasivuni
MyUG : http://www.mugh.net

"Rahul Borade" wrote:

> Hi All,
> In my one project, at many aspx pages I am getting below error.
> Could anyone please give me solution of this.
> ================
> Please click the back button on your browser and try again.Session state is
> not available in this context.
> ================
> I really tried to solve this a lot but could not get the solution.
> Thanking you in advance,
> Rahul
>
Hi,

Thanks for your immediate reply!

But, if I check session on other aspx pages, the session
state is perfectly available.

What could be any other possiblity for this ... can you
please tell me ...

>--Original Message--
>Seems sessions are disabled for your application and
being used everywhere
>inside applications...
>
>Sudhakar Sadasivuni
>http://weblogs.asp.net/ssadasivuni
>MyUG : http://www.mugh.net
>
>"Rahul Borade" wrote:
>> Hi All,
>>
>> In my one project, at many aspx pages I am getting
below error.
>> Could anyone please give me solution of this.
>> ================
>> Please click the back button on your browser and try
again.Session state is
>> not available in this context.
>> ================
>> I really tried to solve this a lot but could not get
the solution.
>>
>> Thanking you in advance,
>> Rahul
>>
>>
>>
>.

Please click the back button on your browser and

Hi All,
In my one project, at many aspx pages I am getting below error.
Could anyone please give me solution of this.
================
Please click the back button on your browser and try again.Session state is
not available in this context.
================
I really tried to solve this a lot but could not get the solution.
Thanking you in advance,
RahulSeems sessions are disabled for your application and being used everywhere
inside applications...
Sudhakar Sadasivuni
[url]http://weblogs.asp.net/sasivuni[/url]
MyUG : http://www.mugh.net
"Rahul Borade" wrote:

> Hi All,
> In my one project, at many aspx pages I am getting below error.
> Could anyone please give me solution of this.
> ================
> Please click the back button on your browser and try again.Session state i
s
> not available in this context.
> ================
> I really tried to solve this a lot but could not get the solution.
> Thanking you in advance,
> Rahul
>
>
Hi,
Thanks for your immediate reply!
But, if I check session on other aspx pages, the session
state is perfectly available.
What could be any other possiblity for this ... can you
please tell me ...

>--Original Message--
>Seems sessions are disabled for your application and
being used everywhere
>inside applications...
>
>Sudhakar Sadasivuni
>[url]http://weblogs.asp.net/sasivuni[/url]
>MyUG : http://www.mugh.net
>
>"Rahul Borade" wrote:
>
below error.
again.Session state is
the solution.
>.
>

Please correct my @ Page directive for codebehind asp.net

I have a vbproject called myvbproject, in that i created a class called class1.

I build the solution to it, and it created the class1.dll in its bin directory.

Now, i want to use that class1.dll in my asp.net projects web form.

I am writing the following in my asp.net webform1: It is not working: Can you please correct my @dotnet.itags.org.page directive code.

<%@dotnet.itags.org. Page language="VB" Codebehind="class1" AutoEventWireup="false" Inherits="myvbproject.class1" %

Thank you very much for the help.To use class1 from compiled assembly class1.ddl you should not alter your page directive. Add reference to class1.dll, declare variable and use it.

Monday, March 26, 2012

Please Help

Hi all,

Please help me to find a better solution for my problem!

i have been trained on Asp.net1.1 but now i have to work on asp.net 2.0 can any one suggest me for finding a quick reference for the updated features &nhancements in visualstudio2005

and in ASp.net 2.0 !

So many features that are there in the 1.1 are still there in 2.0 also but they have been in a different folder in Visual studio

EX:Xml designer in 1.1 has xml view and data view

But in 2.o we have to just right click and select in gridview option

like this example how can we find all 1.1 features in 2.0

Thank you very much in advance!!!

Please give me a proper guidance to find out all these things!

Feature Changes in ASP.NET 2.0
http://msdn2.microsoft.com/en-us/library/aa479401.aspx


Links to ponder...

http://quickstarts.asp.net/QuickStartv20/aspnet/

http://www.sitepoint.com/article/asp-net-getting-started

http://www.w3schools.com/aspnet/default.asp

HTH

Cheers

Vishal Khanna

(pls mark as answer if reply helps)


check out in asp.net quick starts u get more more examples

i.e avilable in www.asp.net


What's New in ASP.NET 2.0

http://msdn2.microsoft.com/en-us/library/fa1h9d0d.aspx

Hope this helps you better understand.

Cheers,

Anwar Buchoo

Saturday, March 24, 2012

Please Help !

Hi,
I am having the Error in ASP.Net Application.
Can you go through this and send me the solution for the Error solving feedback.
Server Error in '/WBS' Application.
------------------------

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
Tariff3Tier.Frm_M_AddHotSpot.ViewHotSpotDetails()
Tariff3Tier.Frm_M_AddHotSpot.ddlHotSpotName_SelectedIndexChanged(Object sender, EventArgs e)
System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) +108
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +26
System.Web.UI.Page.RaiseChangedEvents() +115
System.Web.UI.Page.ProcessRequestMain() +1081

------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573This is probably the most asked about error message and occurs when you are trying to use an object without instantiating it.

Make sure you have instantiated the object before referencing it in the code. If possible, please post your code here since it will be easier to identify the source of error.
We need more information ...
Please give use the code where the error happened ...

A recommendation: always check that your variables are not null !!!
Also, insert the following directive at the top of your aspx page -

<%@. Page debug="true" %>
and run it again.
Please don't post all of the code just yet... The debugger is telling you the problem is happening with this event: .ddlHotSpotName_SelectedIndexChanged(Object sender, EventArgs e)

Please just post the code that is contained in that event

Wednesday, March 21, 2012

Please help me find a solution

I need to build a web application which has these features.

1. I want to build a tree view structure which dynamically maps the dirs and sub dirs on the server. In another word, if the directory/folder structure on the server has been updated, then it shows dynamically/automatically on my web page.

2. I want user to be able to save word document as .html file under the server directory, so that when I click the node of treeview on my web page, the word document could be shown up in the right panel of the web page.

what is the best way to implement it? I have these available:

a.)asp.net /asp
b.)vb.net /vb
c.)write activex control using vb or vb.net then embed it into the web page.(I don't like activex control though)Any from a and b would do. Just remember that asp goes with vb and asp goes with vb.net, the way you have written it looks as if you may be a little confused here.

please help me find a solution

I am about to develop a web application, basically it will be a treeview interface in the left frame ,which displays my folder/file structures on hard drive. when user click a node, the image files displays on the right frame ---Should I use ASP.NET ? IF SO, I couldn't find a treeview control in the tool box.

If i should download a control some where else, where is it and just want to make sure I don't want to use database or xml file to display the treeview, I hope to be looping through the file structure directly under ,say,c:\sampleimages\image_1974\

thanksThere isn't a built-in TreeView control in ASP.NET 1.1.
There will be in 2.0.

There are existing 3rd party TreeView controls you can use.

Try looking on www.asp.net for assorted ASP.NET controls.

Please help me figure this out!

I hope someone answers this thread, I am loosing my mind googling tofind a solution to this and nothing seems to work. I am trying tobuild an application that will let me send an e-mail message with a maxof 5 attachments, the problem that I have faced is that the filesupload fine to the server and then theiy are mailed but for some reason, when I try to add a file.delete() statement after sending the messageI get an error saying: "The file cannot be deleted because it is beingused by another process"... I close explorer, go to the foldercontaining the uploaded files and I try to delete them manually and Ikeep getting the same error "the file is being used by anotherapplicaton" ....
I don't know what I should add to my code tomake this work , here's what I have. I commented out the lines that arethrowing me this error:

Imports System.IO

PartialClass cadil

Inherits System.Web.UI.Page

Dim emaildestinoAsString

Dim strDondeAsString

ProtectedSub btnSend_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles btnSend.Click

Try

If txtSubject.Text =""Then

lblMessage.Visible =True

lblMessage.ForeColor = Drawing.Color.Red

lblMessage.Text ="* you must type your name below *"

ExitSub

EndIf

IfNot ddEscuela.SelectedItem.Value ="NADA"Then

If ddEscuela.SelectedItem.Value ="CADIL"Then

emaildestino = "email0@dotnet.itags.org.mymail.com"

EndIf

If ddEscuela.SelectedItem.Value ="ARCOIRIS"Then

emaildestino = "email1@dotnet.itags.org.mymail.com"

EndIf

If ddEscuela.SelectedItem.Value ="LABORAL"Then

emaildestino = "email2@dotnet.itags.org.mymail.com"

EndIf

Dim emailAsNew System.Net.Mail.MailMessage(txtSubject.Text.ToUpper &" <no_responder@dotnet.itags.org.ultramega.cl>", emaildestino)

email.Subject ="Documentos desde la Web"

email.Body = txtBody.Text

Dim mailClientAsNew System.Net.Mail.SmtpClient

Dim basicAuthenticationInfoAsNew System.Net.NetworkCredential("no_responder@dotnet.itags.org.ultramega.cl","**secret**")

'Put your own, or your ISPs, mail server name on this next line

mailClient.Host ="mail.ultramega.cl"

mailClient.UseDefaultCredentials =False

mailClient.Credentials = basicAuthenticationInfo

Dim attach1AsString =Nothing

Dim attach2AsString =Nothing

Dim attach3AsString =Nothing

Dim attach4AsString =Nothing

Dim attach5AsString =Nothing

Dim strFileNameAsString =Nothing

IfNot Attachment1.PostedFileIsNothingThen

Dim UploadFileAs HttpPostedFile = Attachment1.PostedFile

Dim UploadFileLenAsInteger = UploadFile.ContentLength

If UploadFileLen > 0Then

strFileName = Path.GetFileName(Attachment1.PostedFile.FileName)

strFileName ="attachments/" + strFileName

Attachment1.PostedFile.SaveAs(Server.MapPath(strFileName))

Dim attachAs System.Net.Mail.Attachment =New System.Net.Mail.Attachment(Server.MapPath(strFileName))

email.Attachments.Add(attach)

attach1 = strFileName

EndIf

EndIf

IfNot Attachment2.PostedFileIsNothingThen

Dim UploadFileAs HttpPostedFile = Attachment2.PostedFile

Dim UploadFileLenAsInteger = UploadFile.ContentLength

If UploadFileLen > 0Then

strFileName = Path.GetFileName(Attachment2.PostedFile.FileName)

strFileName ="attachments/" + strFileName

Attachment2.PostedFile.SaveAs(Server.MapPath(strFileName))

Dim attachAs System.Net.Mail.Attachment =New System.Net.Mail.Attachment(Server.MapPath(strFileName))

email.Attachments.Add(attach)

attach2 = strFileName

EndIf

EndIf

IfNot Attachment3.PostedFileIsNothingThen

Dim UploadFileAs HttpPostedFile = Attachment3.PostedFile

Dim UploadFileLenAsInteger = UploadFile.ContentLength

If UploadFileLen > 0Then

strFileName = Path.GetFileName(Attachment3.PostedFile.FileName)

strFileName ="attachments/" + strFileName

Attachment3.PostedFile.SaveAs(Server.MapPath(strFileName))

Dim attachAs System.Net.Mail.Attachment =New System.Net.Mail.Attachment(Server.MapPath(strFileName))

email.Attachments.Add(attach)

attach3 = strFileName

EndIf

EndIf

IfNot Attachment4.PostedFileIsNothingThen

Dim UploadFileAs HttpPostedFile = Attachment4.PostedFile

Dim UploadFileLenAsInteger = UploadFile.ContentLength

If UploadFileLen > 0Then

strFileName = Path.GetFileName(Attachment4.PostedFile.FileName)

strFileName ="attachments/" + strFileName

Attachment4.PostedFile.SaveAs(Server.MapPath(strFileName))

Dim attachAs System.Net.Mail.Attachment =New System.Net.Mail.Attachment(Server.MapPath(strFileName))

email.Attachments.Add(attach)

attach4 = strFileName

EndIf

EndIf

IfNot Attachment5.PostedFileIsNothingThen

Dim UploadFileAs HttpPostedFile = Attachment5.PostedFile

Dim UploadFileLenAsInteger = UploadFile.ContentLength

If UploadFileLen > 0Then

strFileName = Path.GetFileName(Attachment5.PostedFile.FileName)

strFileName ="attachments/" + strFileName

Attachment5.PostedFile.SaveAs(Server.MapPath(strFileName))

Dim attachAs System.Net.Mail.Attachment =New System.Net.Mail.Attachment(Server.MapPath(strFileName))

email.Attachments.Add(attach)

attach5 = strFileName

EndIf

EndIf

mailClient.Send(email)

' If Not attach1 Is Nothing Then

' File.Delete(attach1)

' End If

lblMessage.Visible =True

lblMessage.Text ="your files have been sent."

lblMessage2.Visible =True

Else

lblMessage.Visible =True

lblMessage.ForeColor = Drawing.Color.Red

lblMessage.Text ="* you must select one from the list*"

EndIf

Catch exAs Exception

lblMessage.Text = ex.ToString()

EndTry

EndSub

EndClass


Please someone, any ideas willbe very appreciate......... I'm stuck with this :(
hello?
Perhaps the object is still being held, perhaps by the save operation? I've never used file uploading, so I'm just taking a shot here...

it sounds like the attachment object is still being used (open). try dispose() for each attachment after you send.

http://msdn2.microsoft.com/en-us/library/system.net.mail.mailmessage.aspx


Thank you , I tried adding an attach1.Dispose() after sending the e-mail but I got an error saying Dispose is not a member of String so I believe I am not using the correct object?

I will take a closer look over the weekend

Any additional inputs will be appreciated!


Thank you for your help. I fixed this by adding an

email.Dispose()

statement right after emailclient.send(email)

thanks!!

please help me find a solution

I am about to develop a web application, basically it will be a treeview interface in the left frame ,which displays my folder/file structures on hard drive. when user click a node, the image files displays on the right frame ---Should I use ASP.NET ? IF SO, I couldn't find a treeview control in the tool box.

If i should download a control some where else, where is it and just want to make sure I don't want to use database or xml file to display the treeview, I hope to be looping through the file structure under my say,c:\sampleimages\image_1974\

thanksYou should use ASP.NET if your web server is IIS and you are willing to learn the technology that is central to Microsoft's development plans since 2002.

ASP.NET has been extended by numerous third parties for almost anything you can think of in the user interface. There are a number of perfected treeview webcontrols along with so many more items that are either new to you or much better than the controls built into ASP.NET. Microsoft's controls are there to get you started. They have built ASP.NET to be highly extendable and for it to be very easy to integrate a third party control or code.
You can find the third party products on this site's Control Gallery, www.123asp.com, and www.411asp.net.