Click here to Skip to main content
15,887,464 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHi every body,I have a question and want to ask you Pin
newworms15-Nov-08 16:03
newworms15-Nov-08 16:03 
AnswerRe: Hi every body,I have a question and want to ask you Pin
Abhijit Jana15-Nov-08 22:43
professionalAbhijit Jana15-Nov-08 22:43 
QuestionValidate Textbox in Gridview using Custom Validator(Server side Validation) Pin
suresh_00115-Nov-08 3:38
suresh_00115-Nov-08 3:38 
AnswerRe: Validate Textbox in Gridview using Custom Validator(Server side Validation) Pin
AlexeiXX316-Nov-08 8:16
AlexeiXX316-Nov-08 8:16 
Questionasp.net tree view Pin
ahmed eldeghedy15-Nov-08 3:19
professionalahmed eldeghedy15-Nov-08 3:19 
AnswerRe: asp.net tree view Pin
whatUrunning.com15-Nov-08 4:12
whatUrunning.com15-Nov-08 4:12 
QuestionGenerating user instances in SQL Server is disabled [modified] Pin
TerRO_GirL15-Nov-08 2:46
TerRO_GirL15-Nov-08 2:46 
QuestionOpen new window without javascript Pin
Sandraa15-Nov-08 1:52
Sandraa15-Nov-08 1:52 
Hi all, I will try explain you my problem.
I have file pdf in a field of my database of SQ-Server.
I have a master page and content.
I want two options: or open new page for see pdf with focus in it or response.redirect into content.
I get open my pdf with:
Protected Sub gridView_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView.SelectedIndexChanged
    Try
        If GridView.SelectedIndex >= 0 Then
            Response.Redirect("~/Formularios/VisorFicheros.aspx?Id=" + gridView.SelectedRow.Cells(1).Text)
        End If
    Catch ex As Exception

    End Try
End Sub


but it open all pdf in my master page losing my main menu etc, open my pdf to full page.
i would like to open the pdf in a content of master page but doesn't work i put the code of "visorficheros.aspx" that open my pdf from database
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Try
        Dim id As Integer = Request.QueryString("Id")
        Dim imagedata() As Byte = Ficheros.ObtenerContenidoFichero(id)
        Response.ClearContent()
        Response.ContentType = "application/pdf"
        Response.AddHeader("content-length", imagedata.Length.ToString())
        Response.BinaryWrite(imagedata)
        Response.Flush()
        Response.Close()
    Catch ex As Exception
    End Try
End Sub


Some idea?

also I will try to open with javascript with window.open (I don't like it I prefer that my code be only vb.net without javascript)
I put the code:
Protected Sub gridView_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView.SelectedIndexChanged
    Try
        If GridView.SelectedIndex >= 0 Then
            'Response.Write("<script language='JavaScript'>window.open('VisorFicheros.aspx?Id=" + gridView.SelectedRow.Cells(1).Text + "')</script>"
        End If
    Catch ex As Exception
    End Try
End Sub


but I have 2 problem, the first more important is that I.E block it because is a pop-up and the second problem is that I lost the focus and it is put behind of master page.
Is possible to make it without javascript, vbscript etc only with vb.net?
some idea?

thanks for your help, I am becoming madwoman with it Dead | X|
AnswerRe: Open new window without javascript Pin
Christian Graus15-Nov-08 2:12
protectorChristian Graus15-Nov-08 2:12 
GeneralRe: Open new window without javascript Pin
Sandraa15-Nov-08 2:55
Sandraa15-Nov-08 2:55 
GeneralRe: Open new window without javascript Pin
Perspx15-Nov-08 3:06
Perspx15-Nov-08 3:06 
GeneralRe: Open new window without javascript Pin
Sandraa15-Nov-08 3:14
Sandraa15-Nov-08 3:14 
GeneralRe: Open new window without javascript Pin
Perspx15-Nov-08 3:18
Perspx15-Nov-08 3:18 
GeneralRe: Open new window without javascript Pin
Guffa15-Nov-08 15:28
Guffa15-Nov-08 15:28 
GeneralRe: Open new window without javascript Pin
Tarun Dudhatra16-Nov-08 21:58
Tarun Dudhatra16-Nov-08 21:58 
GeneralRe: Open new window without javascript Pin
Sandraa18-Nov-08 0:01
Sandraa18-Nov-08 0:01 
GeneralRe: Open new window without javascript Pin
Tarun Dudhatra18-Nov-08 1:23
Tarun Dudhatra18-Nov-08 1:23 
QuestionShow Message//in errore hanling Pin
fatemauddin14-Nov-08 20:26
fatemauddin14-Nov-08 20:26 
AnswerRe: Show Message//in errore hanling Pin
varsh1214-Nov-08 22:45
varsh1214-Nov-08 22:45 
AnswerRe: Show Message//in errore hanling Pin
Abhijit Jana15-Nov-08 0:02
professionalAbhijit Jana15-Nov-08 0:02 
AnswerRe: Show Message//in errore hanling Pin
Christian Graus15-Nov-08 2:13
protectorChristian Graus15-Nov-08 2:13 
Questionvs2003 will support third party controls? Pin
Member 387988114-Nov-08 19:37
Member 387988114-Nov-08 19:37 
AnswerRe: vs2003 will support third party controls? Pin
m-khansari14-Nov-08 19:55
m-khansari14-Nov-08 19:55 
AnswerRe: vs2003 will support third party controls? Pin
Christian Graus15-Nov-08 2:14
protectorChristian Graus15-Nov-08 2:14 
QuestionProblem in DropdownList Pin
WinCrs14-Nov-08 18:59
WinCrs14-Nov-08 18:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.