No recarga página
Publicado por francisco (2 intervenciones) el 28/02/2024 19:17:33
Hola:
Tengo una página aspx:
Y el codebehind es:
SI pulso el aingles me debería recargar esta misma página con el idioma a 2. Sin embargo no recarga.
¿Qué fallará? Esta página está en c:\inetpub\wwwroot, el localhost. Está en un portátil nuevo, el viejo se rompió. Tengo asp.net 4.8 y windows 11.
¿Debo hacer algo en características windows? ¿Será cuestión de permisos?
Muchísimas gracias.
Tengo una página aspx:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<%@ Page EnableSessionState="false" EnableViewState="false" CodeFile="default.aspx.vb" Inherits="codigo" %>
<!DOCTYPE html>
<html>
<head>
<title>Vidaalegre</title>
<link href='Imagenes/favicon.ico' rel='shortcut icon' type='image/x-icon'/>
<meta http-equiv="expires" content="-1" />
<meta http-equiv="Pragma" content="no-cache" />
<meta name="description" content="Gran centro comercial Vidaalegre" />
</head>
<body ID="bdcuerpo" style="background-color:#F8F361" runat="server">
<center><img src="Imagenes/Banner_Vidaalegre.gif" alt="Banner Vidaalegre" title="Banner Vidaalegre" height="68" width="468"/>
<br /><asp:Label ID="lblvidaalegre" runat="server" />
<p><a id="aespanol" runat="server" ><img id="imgespanol" src="Imagenes/espanol.gif" height="32" width="32" border="0" runat="server"/></a>
<a id="aingles" runat="server"><img id="imgingles" src="Imagenes/ingles.gif" height="32" width="32" runat="server"/></a>
<a id="afrances" runat="server" ><img id="imgfrances" src="Imagenes/frances.gif" height="32" width="32" runat="server"/></a>
<a id="aportugues" runat="server" ><img id="imgportugues" src="Imagenes/portugues.gif" height="32" width="32" runat="server"/></a></p></center>
<center><asp:HyperLink id="hlnkvidasolidaria" runat="server" /> <asp:HyperLink id="hlnktiempolibre" runat="server" />
<br /><asp:HyperLink id="hlnklibrecomercio" runat="server" /> <asp:HyperLink id="hlnkseccionagradecimiento" runat="server" />
</center>
</body>
</html>
Y el codebehind es:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Sub Page_load(ByVal s As Object, ByVal e As EventArgs) Handles Me.Load
Dim intidioma As Integer = Request.QueryString("idioma")
If intidioma = 0 Then intidioma = 1
If Not IsPostBack Then
Dim fi As New FileInfo(Server.MapPath("Comun/Varios/default1.aspx"))
If fi.Exists Then Server.Transfer("Comun/errores.aspx?error=modomantenimiento&idioma=" & intidioma)
hlnkvidasolidaria.NavigateUrl = "Cresolia/default.aspx?idioma=" & intidioma
hlnktiempolibre.NavigateUrl = "Blog/default.aspx?idioma=" & intidioma
hlnklibrecomercio.NavigateUrl = "Productos/default.aspx?idioma=" & intidioma
hlnkseccionagradecimiento.NavigateUrl = "Agradecimiento/default.aspx?idioma=" & intidioma
aespanol.HRef = "default.aspx?idioma=1"
aingles.HRef = "default.aspx?idioma=2"
afrances.HRef = "default.aspx?idioma=3"
aportugues.HRef = "default.aspx?idioma=4"
'Response.Write("intidioma11=" & intidioma)
If intidioma = 1 Then
lblvidaalegre.Text = "Vidaalegre en español"
hlnkvidasolidaria.Text = "Proyectos de vida solidaria"
hlnkvidasolidaria.ToolTip = "Ver 3 proyectos de vida solidaria"
hlnktiempolibre.Text = "Proyectos de tiempo libre"
hlnktiempolibre.ToolTip = "Ver 2 proyectos de tiempo libre"
hlnklibrecomercio.Text = "Proyectos de libre comercio"
hlnklibrecomercio.ToolTip = "Ver 2 proyectos de libre comercio"
hlnkseccionagradecimiento.Text = "Sección de agradecimiento"
hlnkseccionagradecimiento.ToolTip = "Ver 1 sección de agradecimiento"
imgespanol.Alt = "Español"
imgingles.Alt = "Inglés"
imgfrances.Alt = "Francés"
imgportugues.Alt = "Portugués"
Response.Write("pasaespanol")
'aespanol.Title = imgespanol.Alt
aingles.Title = imgingles.Alt
afrances.Title = imgfrances.Alt
aportugues.Title = imgportugues.Alt
aespanol.HRef = ""
aespanol.Title = ""
'If intidioma = 0 Then intidioma = 1
ElseIf intidioma = 2 Then
lblvidaalegre.Text = "Vidaalegre in english"
hlnkvidasolidaria.Text = "Solidarity life projects"
hlnkvidasolidaria.ToolTip = "See 3 solidarity life projects"
hlnktiempolibre.Text = "Spare time projects"
hlnktiempolibre.ToolTip = "See 2 spare time projects"
hlnklibrecomercio.Text = "Free trade projects"
hlnklibrecomercio.ToolTip = "See 2 free trade projects"
hlnkseccionagradecimiento.Text = "Thanks section"
hlnkseccionagradecimiento.ToolTip = "See 1 thanks section"
imgespanol.Alt = "Spanish"
imgingles.Alt = "English"
imgfrances.Alt = "French"
imgportugues.Alt = "Portuguese"
aespanol.Title = imgespanol.Alt
'aingles.Title = imgingles.Alt
afrances.Title = imgfrances.Alt
aportugues.Title = imgportugues.Alt
aingles.HRef = ""
aingles.Title = ""
ElseIf intidioma = 3 Then
lblvidaalegre.Text = "Vidaalegre en français"
hlnkvidasolidaria.Text = "Projets de vie solidaires"
hlnkvidasolidaria.ToolTip = "Voir 3 projets de vie solidaires"
hlnktiempolibre.Text = "Projets de temps libre"
hlnktiempolibre.ToolTip = "Voir projets de temps libre"
hlnklibrecomercio.Text = "Projets de libre affaire"
hlnklibrecomercio.ToolTip = "Voir 2 projets de libre affaire"
hlnkseccionagradecimiento.Text = "Rubrique de merci"
hlnkseccionagradecimiento.ToolTip = "Voir 1 rubrique de merci"
imgespanol.Alt = "Espagnol"
imgingles.Alt = "Anglais"
imgfrances.Alt = "Français"
imgportugues.Alt = "Portugais"
aespanol.Title = imgespanol.Alt
aingles.Title = imgingles.Alt
'afrances.Title = imgfrances.Alt
aportugues.Title = imgportugues.Alt
afrances.HRef = ""
afrances.Title = ""
Else
lblvidaalegre.Text = "Vidaalegre em português"
hlnkvidasolidaria.Text = "Projetos de vida solidária"
hlnkvidasolidaria.ToolTip = "Ver 3 projetos de vida solidária"
hlnktiempolibre.Text = "Projetos de tempo livre"
hlnktiempolibre.ToolTip = "Ver projetos de tempo livre"
hlnklibrecomercio.Text = "Projetos de livre comerço"
hlnklibrecomercio.ToolTip = "Ver 2 projetos de livre comerço"
hlnkseccionagradecimiento.Text = "Seção de agradecimento"
hlnkseccionagradecimiento.ToolTip = "Ver 1 seção de agradecimento"
imgespanol.Alt = "Espanhol"
imgingles.Alt = "Inglês"
imgfrances.Alt = "Francês"
imgportugues.Alt = "Português"
aespanol.Title = imgespanol.Alt
aingles.Title = imgingles.Alt
afrances.Title = imgfrances.Alt
'aportugues.Title = imgportugues.Alt
aportugues.HRef = ""
aportugues.Title = ""
End If
'Response.Write("proyectos=" & hlnkproyectos.Text)
'Response.Write("idioma=" & Request.QueryString("idioma"))
'Response.End()
'Server.Transfer("cresolia/portada.aspx&idioma=" & Request.QueryString("idioma"))
''aespanol.Attributes.Add("onkeydown", "document.getElementById('lblvidaalegre').value='Vidaalegre en español'")
'imgespanol.Attributes.Add("onclick", "document.getElementById('lblvidaalegre').value='Vidaalegre en español'")
'lblvidaalegre.Text = "Vidaalegre en español"
hlnklibrecomercio.Visible = False
End If
Response.Write("Idiomas=" & intidioma)
End Sub
SI pulso el aingles me debería recargar esta misma página con el idioma a 2. Sin embargo no recarga.
¿Qué fallará? Esta página está en c:\inetpub\wwwroot, el localhost. Está en un portátil nuevo, el viejo se rompió. Tengo asp.net 4.8 y windows 11.
¿Debo hacer algo en características windows? ¿Será cuestión de permisos?
Muchísimas gracias.
Valora esta pregunta


0