Showing posts with label urgent. Show all posts
Showing posts with label urgent. Show all posts

Thursday, March 29, 2012

HTML Frames Problem - Urgent

Hi Guysi have a small issue with my frames on a page . Error details as followsI have two frames , on my left frame i have menu with links ,All where working fine untill few of my users started to getting this error , when ever they click the menu link , the Left menu disappears and only the right page ( page which requested from left menu) get loaded ...its still working fine in my system , we tried reinstalling the IE too .So any one has any ideas abt this ... please let me know ,

Thanks

P.Ramprathap

Hi there,

With the info you have given it is a bit hard to know what could be the problem, so some more information would be good.

Is the page just a static html page with the two frames and the links in the menu just hardcoded in there or is it an aspx page with a dynamic menu or something like that?

How long has it been working before this problem appeared?

Has it worked before for the users who now have a problem?

What browser does the users with the problem use and have they recently upgraded (to IE 7 or something like that)?

/Ola


hi

its aspx page with two frameset inside , its working fine in my system , and other collegues , this happens especially with one user , Its been hard to convince the user that its the browser issue .

In this specific case when ever the user clicks the Left frame ( which contain the menu) the browser navigates to the desired page but not within the frame instead the menu frame gets dissapear and the page loads as a seprate page ....

need to figure out the IE settings which restircts the the frame ..

the user uses IE....

does it makes thinks clear for you ...?


If possible... You may want to re-think using frames with ASP.Net. You may be able to achieve the same results through master pages...

Frames are pretty much evil any way you cut it, but you might want to check the IIS logs and see if the menu is being re-requested and not appearing or if it might be a problem with browser caching.

And yes, there are ways to have this same design effect in a dynamic page withjout frames. Master pages would be a great use here.

Jeff


Its an Enterprise application running across our global customer for past 2-3 years , changing it to masterpage will be diffcult task in getting the approvalSad

Wednesday, March 21, 2012

html at end of download - urgent please help!

hi there

i have the following bit of code that downloads/uploads documents from
a sql database.

the problem i have is when i download an image for example and look at
it in notepad i see the binary data and below it the html from the page
the image was downloaded from. so my 10k image is now 32k.

please any help would be much appreciated.

thanks

shawn

Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnUpload.Click
Dim iLength As Integer =
CType(LifeFileUpload.PostedFile.InputStream.Length , Integer)
If iLength = 0 Then Exit Sub 'not a valid file
Dim sContentType As String =
LifeFileUpload.PostedFile.ContentType
Dim sFileName As String, i As Integer
Dim bytContent As Byte()
ReDim bytContent(iLength)

'strip the path off the filename
i = InStrRev(LifeFileUpload.PostedFile.FileName.Trim, "\")
If i = 0 Then
sFileName = LifeFileUpload.PostedFile.FileName.Trim
Else
sFileName = Right(LifeFileUpload.PostedFile.FileName.Trim,
Len(LifeFileUpload.PostedFile.FileName.Trim) - i)
End If

LifeFileUpload.PostedFile.InputStream.Read(bytCont ent, 0,
iLength)

objDonkey.SelectedClient.AddDocument(objDonkey.Use rName,
sFileName, sContentType, iLength, bytContent, "this is a test
document")

End Sub

Protected Sub btnGetDoc_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnGetDoc.Click
Dim DocId As Integer
Dim objDoc As Life.Clients.Client.DocumentItem

DocId = HiddenSelectedDoc.Value
objDonkey.SelectedClient.GetDocuments()
objDoc = objDonkey.SelectedClient.DocumentList(DocId)

Response.Buffer = True
Response.Expires = -1
Response.ClearContent()
Response.ClearHeaders()

Response.ContentType = "image/jpeg" 'objDoc.ContentType

Response.OutputStream.Write(CType(objDonkey.Select edClient.GetDocument(DocId),
Byte()), 0, CInt(objDoc.ContentLegnth))
Response.AddHeader("Content-Disposition",
"attachment;filename=" + objDoc.Filename)
Response.Flush()

End SubHi Shawn,

Try to clear the response object after the following code:

Response.Buffer = True
Response.Expires = -1
Response.ClearContent()
Response.ClearHeaders()
// Clear the response object.
Response.Clear();

And then when you finished writing into the response stream:

Response.Flush();
Response.End();

I think it might help.

See ya.

Thiago Oliveira

shawn_vandenberg@.yahoo.com escreveu:

Quote:

Originally Posted by

hi there
>
i have the following bit of code that downloads/uploads documents from
a sql database.
>
the problem i have is when i download an image for example and look at
it in notepad i see the binary data and below it the html from the page
the image was downloaded from. so my 10k image is now 32k.
>
please any help would be much appreciated.
>
thanks
>
shawn
>
>
>
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnUpload.Click
Dim iLength As Integer =
CType(LifeFileUpload.PostedFile.InputStream.Length , Integer)
If iLength = 0 Then Exit Sub 'not a valid file
Dim sContentType As String =
LifeFileUpload.PostedFile.ContentType
Dim sFileName As String, i As Integer
Dim bytContent As Byte()
ReDim bytContent(iLength)
>
'strip the path off the filename
i = InStrRev(LifeFileUpload.PostedFile.FileName.Trim, "\")
If i = 0 Then
sFileName = LifeFileUpload.PostedFile.FileName.Trim
Else
sFileName = Right(LifeFileUpload.PostedFile.FileName.Trim,
Len(LifeFileUpload.PostedFile.FileName.Trim) - i)
End If
>
LifeFileUpload.PostedFile.InputStream.Read(bytCont ent, 0,
iLength)
>
objDonkey.SelectedClient.AddDocument(objDonkey.Use rName,
sFileName, sContentType, iLength, bytContent, "this is a test
document")
>
>
End Sub
>
Protected Sub btnGetDoc_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnGetDoc.Click
Dim DocId As Integer
Dim objDoc As Life.Clients.Client.DocumentItem
>
DocId = HiddenSelectedDoc.Value
objDonkey.SelectedClient.GetDocuments()
objDoc = objDonkey.SelectedClient.DocumentList(DocId)
>
>
Response.Buffer = True
Response.Expires = -1
Response.ClearContent()
Response.ClearHeaders()
>
Response.ContentType = "image/jpeg" 'objDoc.ContentType
>
Response.OutputStream.Write(CType(objDonkey.Select edClient.GetDocument(DocId),
Byte()), 0, CInt(objDoc.ContentLegnth))
Response.AddHeader("Content-Disposition",
"attachment;filename=" + objDoc.Filename)
Response.Flush()
>
>
End Sub

html at end of download - urgent please help!

hi there
i have the following bit of code that downloads/uploads documents from
a sql database.
the problem i have is when i download an image for example and look at
it in notepad i see the binary data and below it the html from the page
the image was downloaded from. so my 10k image is now 32k.
please any help would be much appreciated.
thanks
shawn
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnUpload.Click
Dim iLength As Integer =
CType(LifeFileUpload.PostedFile.InputStream.Length, Integer)
If iLength = 0 Then Exit Sub 'not a valid file
Dim sContentType As String =
LifeFileUpload.PostedFile.ContentType
Dim sFileName As String, i As Integer
Dim bytContent As Byte()
ReDim bytContent(iLength)
'strip the path off the filename
i = InStrRev(LifeFileUpload.PostedFile.FileName.Trim, "\")
If i = 0 Then
sFileName = LifeFileUpload.PostedFile.FileName.Trim
Else
sFileName = Right(LifeFileUpload.PostedFile.FileName.Trim,
Len(LifeFileUpload.PostedFile.FileName.Trim) - i)
End If
LifeFileUpload.PostedFile.InputStream.Read(bytContent, 0,
iLength)
objDonkey.SelectedClient.AddDocument(objDonkey.UserName,
sFileName, sContentType, iLength, bytContent, "this is a test
document")
End Sub
Protected Sub btnGetDoc_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnGetDoc.Click
Dim DocId As Integer
Dim objDoc As Life.Clients.Client.DocumentItem
DocId = HiddenSelectedDoc.Value
objDonkey.SelectedClient.GetDocuments()
objDoc = objDonkey.SelectedClient.DocumentList(DocId)
Response.Buffer = True
Response.Expires = -1
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "image/jpeg" 'objDoc.ContentType
Response.OutputStream.Write(CType(objDonkey.SelectedClient.GetDocument(DocId
),
Byte()), 0, CInt(objDoc.ContentLegnth))
Response.AddHeader("Content-Disposition",
"attachment;filename=" + objDoc.Filename)
Response.Flush()
End SubHi Shawn,
Try to clear the response object after the following code:
Response.Buffer = True
Response.Expires = -1
Response.ClearContent()
Response.ClearHeaders()
// Clear the response object.
Response.Clear();
And then when you finished writing into the response stream:
Response.Flush();
Response.End();
I think it might help.
See ya.
Thiago Oliveira
shawn_vandenberg@.yahoo.com escreveu:

> hi there
> i have the following bit of code that downloads/uploads documents from
> a sql database.
> the problem i have is when i download an image for example and look at
> it in notepad i see the binary data and below it the html from the page
> the image was downloaded from. so my 10k image is now 32k.
> please any help would be much appreciated.
> thanks
> shawn
>
> Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles btnUpload.Click
> Dim iLength As Integer =
> CType(LifeFileUpload.PostedFile.InputStream.Length, Integer)
> If iLength = 0 Then Exit Sub 'not a valid file
> Dim sContentType As String =
> LifeFileUpload.PostedFile.ContentType
> Dim sFileName As String, i As Integer
> Dim bytContent As Byte()
> ReDim bytContent(iLength)
> 'strip the path off the filename
> i = InStrRev(LifeFileUpload.PostedFile.FileName.Trim, "\")
> If i = 0 Then
> sFileName = LifeFileUpload.PostedFile.FileName.Trim
> Else
> sFileName = Right(LifeFileUpload.PostedFile.FileName.Trim,
> Len(LifeFileUpload.PostedFile.FileName.Trim) - i)
> End If
> LifeFileUpload.PostedFile.InputStream.Read(bytContent, 0,
> iLength)
> objDonkey.SelectedClient.AddDocument(objDonkey.UserName,
> sFileName, sContentType, iLength, bytContent, "this is a test
> document")
>
> End Sub
> Protected Sub btnGetDoc_Click(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles btnGetDoc.Click
> Dim DocId As Integer
> Dim objDoc As Life.Clients.Client.DocumentItem
> DocId = HiddenSelectedDoc.Value
> objDonkey.SelectedClient.GetDocuments()
> objDoc = objDonkey.SelectedClient.DocumentList(DocId)
>
> Response.Buffer = True
> Response.Expires = -1
> Response.ClearContent()
> Response.ClearHeaders()
> Response.ContentType = "image/jpeg" 'objDoc.ContentType
> Response.OutputStream.Write(CType(objDonkey.SelectedClient.GetDocument(Doc
Id),
> Byte()), 0, CInt(objDoc.ContentLegnth))
> Response.AddHeader("Content-Disposition",
> "attachment;filename=" + objDoc.Filename)
> Response.Flush()
>
> End Sub