Ver Mensaje Individual
  #43 (permalink)  
Antiguo 09/05/2005, 04:50
Avatar de neivan
neivan
 
Fecha de Ingreso: febrero-2005
Mensajes: 539
Antigüedad: 20 años, 1 mes
Puntos: 1
<html>
<head>
<script>
function add(valor)
{

alert(valor);
var inf = document.getElementById('text').value;
if (inf.indexOf(valor)==-1)
{
document.getElementById('text').value = document.getElementById('text').value + valor + "#";

}
else
{
document.getElementById('text').value = document.getElementById('text').value.replace(valo r + '#','');
}

//document.getElementById('text').setAttribute('valu e',document.getElementById('text').getAttribute('v alue')+valor);

}

</script>
</head>
<body>
<form runat="server">
<img style="WIDTH: 162px; HEIGHT: 65px" height="65" src="logo.GIF" width="130" />
<asp:DataGrid id="DataGrid1" runat="server" onsortcommand="DataGrid1_SortCommand" AutoGenerateColumns="False" CellPadding="3" BackColor="White" BorderColor="#999999" BorderWidth="1px" GridLines="Vertical" BorderStyle="None" AllowSorting="True">
<FooterStyle forecolor="Black" backcolor="#CCCCCC"></FooterStyle>
<HeaderStyle font-bold="True" forecolor="White" backcolor="#000084"></HeaderStyle>
<PagerStyle horizontalalign="Center" forecolor="Black" backcolor="#999999" mode="NumericPages"></PagerStyle>
<SelectedItemStyle font-bold="True" forecolor="White" backcolor="#008A8C"></SelectedItemStyle>
<AlternatingItemStyle backcolor="Gainsboro"></AlternatingItemStyle>
<ItemStyle forecolor="Black" backcolor="#EEEEEE"></ItemStyle>
<Columns>
<asp:BoundColumn DataField="Apellidos_Nombre" SortExpression="Apellidos_Nombre" HeaderText="Apellidos, Nombre"></asp:BoundColumn>
<asp:BoundColumn DataField="DNI" SortExpression="DNI" HeaderText="DNI"></asp:BoundColumn>
<asp:BoundColumn DataField="Telefono1" SortExpression="Telefono1" HeaderText="Teléfono móvil"></asp:BoundColumn>
<asp:BoundColumn DataField="Telefono2" SortExpression="Telefono2" HeaderText="Teléfono fijo"></asp:BoundColumn>
<asp:BoundColumn DataField="Curso" SortExpression="Curso" HeaderText="Curso"></asp:BoundColumn>
<asp:BoundColumn DataField="FechaINi" SortExpression="FechaINi" HeaderText="Fecha Inicial" DataFormatString="{0:MM-dd-yyyy}"></asp:BoundColumn>
<asp:BoundColumn DataField="FechaFin" SortExpression="FechaFin" HeaderText="Fecha Final" DataFormatString="{0:MM-dd-yyyy}"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Pagado">
<ItemTemplate>
<!-- <asp:CheckBox id="CheckBox" runat="server" onclick="javascript:add(<%# DataBinder.Eval(Container.DataItem,'DNI') %>);" Checked='<%# Container.Dataitem ("Pagado") %>' runat="server"></asp:CheckBox>-->
<input id="micheck" type="checkbox" checked='<%# Container.Dataitem ("Pagado") %>' onclick='javascript:add( "<%# (Container.Dataitem ("id")).toString %>" ) ;' />
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="id" SortExpression="id" HeaderText="id"></asp:BoundColumn>
</Columns>
</asp:DataGrid>
<!-- Insert content here --><a href="TipoCurso.aspx">volver atras</a> <asp:Label id="Label1" runat="server">Label</asp:Label>
<input id="text" type="text" />
<input id="button1" onclick='alert("entra");javascript:__doPostBack("G uardar",document.getElementbyId("text").value);' type="button" value="Guardar" name="button1" runat="server" />
</form>
</body>
</html>


sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

dim ds as System.Data.DataSet
ds=dataset()
Page.GetPostBackEventReference(Page)
label1.text +=label1.text
if request.form.item("__eventtarget") = "Guardar" then
label1.text=Convert.toString(request.Form.Item("__ eventargument"))
end if
if not ispostback then
if Request.querystring("curso")="" then
response.redirect("europa.aspx")
else

SESSION("ds1")=ds
datagrid1.DataSource=ds.tables("TCURSOS")

datagrid1.databind()
end if
end if



'lblerror.visible=false
end sub

Probe lo que em pusiste y tampoco,no me recarga,he leido la pagina que te postee antes dond esplica el funcionamiento y me deberia funcionar