Click here to Skip to main content
12,453,672 members (69,092 online)
   

ASP.NET

 
AnswerRe: adsense alternatives Pin
ravi398420-Nov-12 20:15
memberravi398420-Nov-12 20:15 
QuestionBack Page link with Attachment asp.net 4 [Solved] Pin
εїзεїзεїз18-Nov-12 0:24
memberεїзεїзεїз18-Nov-12 0:24 
AnswerRe: Back Page link with Attachment asp.net 4 Pin
n.podbielski18-Nov-12 20:12
membern.podbielski18-Nov-12 20:12 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
εїзεїзεїз18-Nov-12 20:38
memberεїзεїзεїз18-Nov-12 20:38 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
n.podbielski18-Nov-12 21:11
membern.podbielski18-Nov-12 21:11 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
εїзεїзεїз18-Nov-12 21:50
memberεїзεїзεїз18-Nov-12 21:50 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
n.podbielski18-Nov-12 22:14
membern.podbielski18-Nov-12 22:14 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
εїзεїзεїз19-Nov-12 21:29
memberεїзεїзεїз19-Nov-12 21:29 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
n.podbielski19-Nov-12 21:33
membern.podbielski19-Nov-12 21:33 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
εїзεїзεїз19-Nov-12 23:02
memberεїзεїзεїз19-Nov-12 23:02 
AnswerRe: Back Page link with Attachment asp.net 4 Pin
Zaf Khan26-Nov-12 9:02
memberZaf Khan26-Nov-12 9:02 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
εїзεїзεїз26-Nov-12 20:49
memberεїзεїзεїз26-Nov-12 20:49 
GeneralRe: Back Page link with Attachment asp.net 4 Pin
Zaf Khan27-Nov-12 7:55
memberZaf Khan27-Nov-12 7:55 
Questioncall javascript in button1_click in bihindcode Pin
jojoba201116-Nov-12 22:22
memberjojoba201116-Nov-12 22:22 
Hi,
How i can call javascript OK function in click event of btnOK :
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridviewGhataKhadamat.aspx.cs"
    Inherits="Tina.WebUI.WorkFlows.Forms.Khadamat.GridviewGhataKhadamat" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
 
    <script type="text/javascript">
        function Close() {
            window.close();
        }
       
        function OK(Id,Name,Code) {
 
            var vReturnValue = new Object();
            vReturnValue.Id = Id;
            vReturnValue.Name = Name;
            vReturnValue.Code = Code;  
            window.returnValue = vReturnValue;
            window.close();
        } 
        
    </script>
 
</head>
<body >
    <form id="form1" runat="server">
 <div>
       <%-- <asp:HiddenField ID="GridviewTypeT" runat="server" />--%>
        <asp:GridView ID="gvGhataKhadamat" runat="server" AutoGenerateColumns="False" BackColor="White"
            BorderColor="#CC9966" BorderStyle="Inset" BorderWidth="1px" CellPadding="4" Font-Names="Verdana">
            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
            <Columns>
                <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                        <input name="rbGhataKhadamat" type="radio" value="<%# Eval("Id") %>,<%# Eval("Name") %>,<%# Eval("Code") %>" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Id" HeaderText="ID" Visible="false" />
                <asp:BoundField DataField="Code" HeaderText="<%$ Resources:Khadamat, Code %>" />
                <asp:BoundField DataField="Name" HeaderText="<%$ Resources:Khadamat, Name %>" />
            </Columns>
            <RowStyle BackColor="White" ForeColor="#330099" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
            <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
        </asp:GridView>
    </div>
     <asp:Button runat="server" ID="btnOk" Text="<%$ Resources:Khadamat, ok %>" 
OnClick="btnOk_Click"/>
    <asp:Button runat="server" ID="btnCancel" Text="<%$ Resources:Khadamat, cancel %>"
        OnClientClick="Close()" />
    </form>
</body>
</html>

and this is bihind code

protected void btnOk_Click(object sender, EventArgs e)
        {
            
            string[] strSelected=Request.Form["rbGhataKhadamat"].Split(new char[]{','});
            Page.ClientScript.RegisterStartupScript(GetType(), "OK", "OK(" + "'" + strSelected[0] + "','" + strSelected[1] + "','" + strSelected[2] + "'"+");", true);
             
        }

it doesnt call OK function.

id didnt used onclientclick event cause i must pass the selected grid values.

thanks in advanced!

modified 17-Nov-12 4:50am.

NewsSOVED ! Pin
jojoba201116-Nov-12 23:28
memberjojoba201116-Nov-12 23:28 
QuestionMessage Removed Pin
Fernando "Poorlyte" Girotto16-Nov-12 19:40
memberFernando "Poorlyte" Girotto16-Nov-12 19:40 
QuestionWhat is this doing Pin
rakeshs31215-Nov-12 22:10
memberrakeshs31215-Nov-12 22:10 
AnswerRe: What is this doing Pin
ryanb3116-Nov-12 7:41
memberryanb3116-Nov-12 7:41 
QuestionBuilding DOM from xml - asp.net controls, or html controls? Pin
lvq68415-Nov-12 21:17
memberlvq68415-Nov-12 21:17 
AnswerRe: Building DOM from xml - asp.net controls, or html controls? Pin
jkirkerx16-Nov-12 8:13
memberjkirkerx16-Nov-12 8:13 
GeneralRe: Building DOM from xml - asp.net controls, or html controls? Pin
lvq68418-Nov-12 22:10
memberlvq68418-Nov-12 22:10 
QuestionRe: Building DOM from xml - asp.net controls, or html controls? Pin
n.podbielski17-Nov-12 1:47
membern.podbielski17-Nov-12 1:47 
QuestionChild config files Pin
indian14315-Nov-12 16:33
memberindian14315-Nov-12 16:33 
AnswerRe: Child config files Pin
jkirkerx16-Nov-12 8:54
memberjkirkerx16-Nov-12 8:54 
Questionbind multiple XMLDataSource to one Repeater Pin
jrahma15-Nov-12 3:19
memberjrahma15-Nov-12 3:19 
AnswerRe: bind multiple XMLDataSource to one Repeater Pin
Anurag Gandhi15-Nov-12 21:20
memberAnurag Gandhi15-Nov-12 21:20 
QuestionAspx control Pin
rakeshs31214-Nov-12 21:07
memberrakeshs31214-Nov-12 21:07 
AnswerRe: Aspx control Pin
Robert Bettinelli3-Dec-12 15:30
memberRobert Bettinelli3-Dec-12 15:30 
QuestionCould not load file or assembly Pin
xut244714-Nov-12 20:11
memberxut244714-Nov-12 20:11 
AnswerRe: Could not load file or assembly Pin
ryanb3116-Nov-12 7:42
memberryanb3116-Nov-12 7:42 
QuestionProblem with foreach loop in MVC 3 Razor View Pin
solomon20114-Nov-12 4:09
membersolomon20114-Nov-12 4:09 
AnswerRe: Problem with foreach loop in MVC 3 Razor View Pin
n.podbielski14-Nov-12 6:34
membern.podbielski14-Nov-12 6:34 
GeneralRe: Problem with foreach loop in MVC 3 Razor View Pin
mayankgupta68828-Nov-12 15:28
membermayankgupta68828-Nov-12 15:28 
GeneralRe: Problem with foreach loop in MVC 3 Razor View Pin
n.podbielski29-Nov-12 6:22
membern.podbielski29-Nov-12 6:22 
AnswerRe: Problem with foreach loop in MVC 3 Razor View Pin
vicent estevan19-Nov-12 2:11
membervicent estevan19-Nov-12 2:11 
QuestionHRM and Payroll Pin
silentspeaker13-Nov-12 19:59
membersilentspeaker13-Nov-12 19:59 
AnswerRe: HRM and Payroll Pin
Sandeep Mewara13-Nov-12 21:18
mvpSandeep Mewara13-Nov-12 21:18 
GeneralRe: HRM and Payroll Pin
jkirkerx14-Nov-12 7:49
memberjkirkerx14-Nov-12 7:49 
QuestionSaving Files From SQL to a Specific Folder without Prompt Pin
εїзεїзεїз13-Nov-12 19:36
memberεїзεїзεїз13-Nov-12 19:36 
AnswerRe: Saving Files From SQL to a Specific Folder without Prompt Pin
Sandeep Mewara13-Nov-12 21:24
mvpSandeep Mewara13-Nov-12 21:24 
GeneralRe: Saving Files From SQL to a Specific Folder without Prompt Pin
εїзεїзεїз14-Nov-12 0:21
memberεїзεїзεїз14-Nov-12 0:21 
AnswerRe: Saving Files From SQL to a Specific Folder without Prompt Pin
Bernhard Hiller13-Nov-12 21:36
memberBernhard Hiller13-Nov-12 21:36 
AnswerRe: Saving Files From SQL to a Specific Folder without Prompt Pin
Richard Deeming14-Nov-12 1:58
memberRichard Deeming14-Nov-12 1:58 
GeneralRe: Saving Files From SQL to a Specific Folder without Prompt Pin
εїзεїзεїз14-Nov-12 4:25
memberεїзεїзεїз14-Nov-12 4:25 
Questionworker process with single to instance Pin
anishkannan13-Nov-12 19:16
memberanishkannan13-Nov-12 19:16 
AnswerRe: worker process with single to instance Pin
n.podbielski14-Nov-12 6:39
membern.podbielski14-Nov-12 6:39 
GeneralRe: worker process with single to instance Pin
anishkannan14-Nov-12 18:05
memberanishkannan14-Nov-12 18:05 
GeneralRe: worker process with single to instance Pin
n.podbielski14-Nov-12 20:23
membern.podbielski14-Nov-12 20:23 
QuestionHide ".aspx" from the page name Pin
mhadef12-Nov-12 23:50
membermhadef12-Nov-12 23:50 
AnswerRe: Hide ".aspx" from the page name Pin
Pete O'Hanlon13-Nov-12 0:45
protectorPete O'Hanlon13-Nov-12 0:45 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 29 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid