Click here to Skip to main content
15,888,454 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRe: Please help me for online compiler for "c" language? Pin
Richard MacCutchan26-Jan-14 21:52
mveRichard MacCutchan26-Jan-14 21:52 
AnswerRe: Please help me for online compiler for "c" language? Pin
Kornfeld Eliyahu Peter26-Jan-14 22:59
professionalKornfeld Eliyahu Peter26-Jan-14 22:59 
AnswerRe: Please help me for online compiler for "c" language? Pin
prince_crazy27-Jan-14 1:12
prince_crazy27-Jan-14 1:12 
GeneralRe: Please help me for online compiler for "c" language? Pin
Richard MacCutchan27-Jan-14 1:18
mveRichard MacCutchan27-Jan-14 1:18 
SuggestionRe: Please help me for online compiler for "c" language? Pin
Shameel27-Jan-14 22:54
professionalShameel27-Jan-14 22:54 
GeneralRe: Please help me for online compiler for "c" language? Pin
_Maxxx_28-Jan-14 19:23
professional_Maxxx_28-Jan-14 19:23 
GeneralRe: Please help me for online compiler for "c" language? Pin
Rahul VB30-Jan-14 17:56
professionalRahul VB30-Jan-14 17:56 
QuestionPlease Help me adding Ajax ModalPopupExtender control to my code Pin
Member 1055000325-Jan-14 23:15
Member 1055000325-Jan-14 23:15 
I have a ForwardPosting.aspx page. It is a content page under the master page "MasterPages\MasterPage.master".

When its loading, the "MainFields" Div is shown normally. The "MainFields" Div markup code is the part bolded part along with its "MainFieldsDivStyle" CSS styling as following:

ASP.NET
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
                       
                         
         .MainFieldsDivStyle
        {
            border-color: Black;
            width: 75%;
            border-style: solid;
            margin-top: 22px;
            background: rgb(219, 219, 219);
            background: rgb(219, 219, 219);
        }
        
        .PopUpDivStyle
        {
            border-color: Black;
            width: 50%;
            border-style: solid;
            margin-top: 22px;
            background: rgb(219, 219, 219);
            background: rgb(219, 219, 219);
        }
        
        .PopUpTableStyle
        {
            height:50px;
            width:88px;
            margin-left: 0px;
        }
        
        .StatusDDStyle
        {
            border: thin solid #000000;
            background-color: #DADADA;
            text-align:right;
        }
                 
               
        .ErrorMessage
        {
            color: red;
            text-align: right;
            font-family: "Sakkal Majalla";
            font-style: normal;
            font-size: x-large;
        }
       
        .CellStyle
        {
            background-color:#7DE6FF;
            border-color:Black;
            border-style:solid;
            border-width:1px;
        }
        .FileUploadStyle
        {
            direction:rtl;
        }
       
        
        .style2
        {
            font-size: 26px;
        }
       
        
        </style>
    
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CpMainContent" Runat="Server">

    <script type="text/javascript">
        function textCounter(field, maxlimit) {
            //Get the label object
            var countfield = document.getElementById('<%=lblCharacterRemaining.ClientID %>');
            //compare and check the textbox value crosed the max length limit or not
            if (field.value.length > maxlimit) {
                //Assing the remaining value
                field.value = field.value.substring(0, maxlimit);
                return false;
            }
            else {
                //Assign the values to label control
                countfield.innerHTML = maxlimit - field.value.length;
            }
        }

        function IsFileSelected() {
            if (document.getElementById("<%=AttachmentsSelecter.ClientID%>").value == "") {
                document.getElementById("<%=AttachmentsSelecter.ClientID%>").style.color = "Transparent";
                document.getElementById("<%=AttachmentsSelecter.ClientID%>").style.backgroundColor = "Red";
            }
            else {
                document.getElementById("<%=AttachmentsSelecter.ClientID%>").style.color = "black";
                document.getElementById("<%=AttachmentsSelecter.ClientID%>").style.backgroundColor = "Green";
            }
        }
    </script>

    <div id="MainFields"  runat="server" class="MainFieldsDivStyle" >

        <table id="ReplyingForm" runat="server" width="98%">
            <tr>
                <td width="30%" style="text-align: right">
                </td>
                <td>
                </td>
                <td width="48%" height="50px">
                     </td>
                <td >
                </td>
                <td width="10%" >
                </td>
                
                
            </tr>
            <tr>
                
                <td>
                </td>
                <td>
                </td>
                <td align="right">
                    <asp:textbox ID="SourceTxtBox" runat="server" Height="35px"
                    style="font-family: 'Sakkal Majalla'; font-size: 22px; text-align: right; margin-top: 0px; border-style:solid; border-color:Black; "
                    Width="500px" Enabled="False"></asp:textbox>
                </td>
                <td align="right" class="CellStyle">
                    <asp:Label ID="FromLabel" runat="server" Text="مـــــــن"
                        BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="35px"
                        
                        style="font-size: 26px; margin-right:5px; font-family: 'Sakkal Majalla'; text-align: right;" Width="110px"
                        ></asp:Label>
                </td>
                <td>
                </td>

                

            </tr>
            
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td align="right">
                    
                    

                <asp:DropDownList ID="TargetName" runat="server" DataSourceID="SDS1"
                DataTextField="Name" DataValueField="Indx" Height="35px"
                style="font-family: 'Sakkal Majalla'; font-size: 22px; text-align: right; margin-top: 0px; margin-bottom: 0px; border-style:solid; border-color:Black;"
                Width="504px" BackColor="White" />
                        

                </td>
                <td align="right" class="CellStyle">
                    <asp:Label ID="ToLabel" runat="server" Text="إلـــى"
                        BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="30px"
                        
                        style="font-size: 26px;; margin-right:5px; font-family: 'Sakkal Majalla'; text-align: right;"
                        BorderColor="Black" Width="110px"
                        ></asp:Label>
                </td>
                <td>
                </td>
            </tr>

            <tr>
                <td>
                </td>
                <td>
                </td>
                <td align="right">
                    <asp:textbox ID="RefNoTxtBox" runat="server" Height="35px"
                    style="font-family: 'Sakkal Majalla'; font-size: 22px; text-align: right; margin-top: 0px; border-style:solid; border-color:Black; "
                    Width="500px" Enabled="False"></asp:textbox>
                </td>
                <td align="right" class="CellStyle">
                    <asp:Label ID="RefNoLabel" runat="server" Text="مرجع الرسالة"
                    BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="35px"
                    style="font-size: 26px; margin-right:5px;  font-family: 'Sakkal Majalla'; text-align: right;"
                        BorderColor="Black" Width="110px"
                    ></asp:Label>
                </td>
                <td>
                </td>
            </tr>

            
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td align="right">
                    
                    <asp:textbox ID="LetterIDTxtBox" runat="server" Height="35px"
                        
                        style="font-family: 'Sakkal Majalla'; font-size: 22px; text-align: right; margin-top: 0px; border-style:solid; border-color:Black; "
                        Width="500px" Enabled="False"></asp:textbox>
                </td>
                <td align="right" class="CellStyle">
                    <asp:Label ID="LetterIDLabel" runat="server" Text="رقم الرسالة"
                        BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="30px"
                        
                        style="font-size: 26px; margin-right:5px;  font-family: 'Sakkal Majalla'; text-align: right;"
                        BorderColor="Black" Width="110px"
                        ></asp:Label>
                </td>
                <td>
                </td>
            </tr>

            
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td align="right">
                    
                    <asp:textbox ID="SubjectTxtBox" runat="server" Height="35px"
                        
                        style="font-family: 'Sakkal Majalla'; font-size: 22px; text-align: right; margin-top: 0px; border-style:solid; border-color:Black; "
                        Width="500px" Enabled="False"></asp:textbox>
                </td>
                <td align="right" class="CellStyle">
                    <asp:Label ID="SubjectLabel" runat="server" Text="الموضــوع"
                    BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="35px"
                    style="font-size: 26px; margin-right:5px;  font-family: 'Sakkal Majalla'; text-align: right;"
                        BorderColor="Black" Width="110px"
                    ></asp:Label>
                </td>
                <td>
                </td>
            </tr>


            <tr>
                
                <td style="text-align: right">
                    <asp:RequiredFieldValidator ID="CommentsRequiredValidator" runat="server"
                        ErrorMessage="لم تقم بإدخال الملاحظات" ControlToValidate="CommentsTxtBox"
                        CssClass="ErrorMessage" SetFocusOnError="True" Display="Dynamic">*</asp:RequiredFieldValidator>
                </td>

                <td>
                     </td>
                <td align="right">
                    <asp:TextBox ID="CommentsTxtBox" runat="server" TextMode="MultiLine" Height="100px"
                    Width="500px" BorderColor="Black" BorderStyle="Solid" Style="font-size: 22px;
                    font-family: 'Sakkal Majalla'; text-align: right;" MaxLength="400" onkeyup="textCounter(this,400);"></asp:TextBox>
                </td>
                <td align="right" class="CellStyle">
                    <asp:Label ID="CommentsLabel" runat="server" Text="الملاحظات"
                    BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="35px"
                    style="font-size: 26px; margin-right:5px;  font-family: 'Sakkal Majalla'; text-align: right;"
                        BorderColor="Black" Width="110px"
                    ></asp:Label>
                </td>
                <td>
                </td>
            </tr>

            <tr>
                <td>
                </td>
                <td>
                </td>
                <td style="text-align: right">
                    <asp:Label ID="lblCharacterRemaining" runat="server" Text="400" Height="35px" Style="font-family: Fanan;
                    font-size: 20px; text-align: center; margin-top: 0px; border-style: solid; border-color: Black;"
                    Width="80px" BackColor="#F9F9F9" Enabled="False" BorderColor="Black" BorderStyle="Solid"
                    BorderWidth="1px"></asp:Label>
                </td>
                <td class="CellStyle">
                </td>
                <td>
                </td>
            </tr>

            <tr>
                <td>
                </td>
                <td>
                </td>
                 <td align="right">
                    <asp:DropDownList ID="RAPDDL" runat="server" Height="35px"
                    style="font-family: Fanan; font-size: 22px; text-align: center; margin-top: 0px; border-style:solid; border-color:Black; "
                    Width="80px" DataSourceID="SDS2" DataTextField="Count" DataValueField="Count">
                     </asp:DropDownList>
                </td>
                <td align="right" class="CellStyle">
                    <asp:Label ID="RAPLabel" runat="server" Text="مهــــــلة الـــرد"
                    BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="35px"
                    style="font-size: 26px; margin-right:5px;  font-family: 'Sakkal Majalla'; text-align: right;"
                        BorderColor="Black" Width="110px"
                    ></asp:Label>
                </td>
                <td>
                </td>
            </tr>

            <tr>
                <td>
                </td>
                <td>
                </td>
                <td align="right"  >
                    <asp:DropDownList ID="ImportanceDD" runat="server" Height="32px"
                    style="font-family: SC_AMEEN; font-size: 20px; text-align: center; margin-top: 0px; border-style:solid; border-color:Black;"
                    Width="80px" DataSourceID="SDS3" DataTextField="Importance"
                        DataValueField="ImportValue">
                     </asp:DropDownList>
                </td>
                <td align="right" class="CellStyle">
                    <asp:Label ID="Label1" runat="server" Text="الأهمية"
                    BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="35px"
                    style="font-size: 26px; margin-right:5px;  font-family: 'Sakkal Majalla'; text-align: right;"
                    BorderColor="Black" Width="110px" >
                    </asp:Label>
                </td>
                <td>
                </td>
            </tr>

            <tr >

                <td style="text-align: right">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                        ErrorMessage="لم تقم باختيار أي ملف مرفق"  CssClass="ErrorMessage"
                        ControlToValidate="AttachmentsSelecter" SetFocusOnError="True"
                        Display="Dynamic">*</asp:RequiredFieldValidator>
                </td>
                <td>
                    <asp:CustomValidator ID="CustomValidator1" runat="server"
                        ErrorMessage="نوع الملف المرفق الذي قمت باختياره غير صحيح"
                        ControlToValidate="TmpTxt" OnServerValidate="AttachmentValidator1"
                        CssClass="ErrorMessage" SetFocusOnError="True" Display="Dynamic">*</asp:CustomValidator>
                </td>
                <td align="right" style="text-align: center">
                    
                    <asp:FileUpload ID="AttachmentsSelecter" runat="server" onchange="IsFileSelected()"
                    Width="500px" BorderColor="Black" BorderStyle="Solid"
                    Height="35px" BackColor="White" BorderWidth="2px" style="margin-left: 4px; font-size: 20px; font-family: Tahoma;"
                        CssClass="FileUploadStyle" />
                    <br />
                    
                    <asp:TextBox ID="RecTmpTxt" runat="server" Visible="False" Width="1px">Scratch</asp:TextBox>
                    
                    <asp:TextBox ID="SubTmpTxt" runat="server" Visible="False" Width="1px">Scratch</asp:TextBox>
                    
                    <asp:TextBox ID="TmpTxt" runat="server" Visible="False" Width="1px">Scratch</asp:TextBox>
                    
                </td>
                <td align="right" class="CellStyle" >
                    <asp:Label ID="AttachmentLabel" runat="server" Text="المرفقات"
                    BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="35px"
                    style="font-size: 26px; margin-right:5px;  font-family: 'Sakkal Majalla'; text-align: right;" Width="110px"
                    ></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            

            <tr>
                <td style="text-align: right">
                    <asp:CustomValidator ID="SubmittedByValidator" runat="server"
                        ErrorMessage="لم تقم بإدخال إسم الذي قام بالتسليم"
                        ControlToValidate="SubTmpTxt"
                        OnServerValidate="SubmittedByValidator_ServerValidate" CssClass="ErrorMessage"
                        SetFocusOnError="True" Display="Dynamic">*</asp:CustomValidator>
                </td>
                <td>
                </td>

                <td align="right">
                    
                    <asp:textbox ID="SubmittedByTxtBox" runat="server" Height="35px"
                        
                        style="font-family: 'Sakkal Majalla'; font-size: 22px; text-align: right; margin-top: 2px; border-style:solid; border-color:Black; "
                        Width="500px"></asp:textbox>
                </td>
                <td align="right" class="CellStyle" >
                    <asp:Label ID="SubmittedByLabel" runat="server" Text="قام بالتسليم"
                    BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="35px"
                    style="font-size: 26px; margin-right:5px;  font-family: 'Sakkal Majalla'; text-align: center;"
                    ></asp:Label>
                </td>
                <td>
                </td>
            </tr>

            <tr>
                <td style="text-align: right">
                    <asp:CustomValidator ID="ReceivedByValidator" runat="server"
                        ErrorMessage="لم تقم بإدخال إسم الذي قام بالاستلام"
                        ControlToValidate="RecTmpTxt"
                        OnServerValidate="ReceivedByValidator_ServerValidate"  CssClass="ErrorMessage"
                        SetFocusOnError="True" Display="Dynamic">*</asp:CustomValidator>
                </td>
                <td>
                </td>

                <td align="right">
                    
                    <asp:textbox ID="ReceivedByTxtBox" runat="server" Height="35px"
                    style="font-family: 'Sakkal Majalla'; font-size: 22px; text-align: right; margin-top: 0px; border-style:solid; border-color:Black; "
                    Width="500px"></asp:textbox>
                </td>
                <td align="right" class="CellStyle" >
                    <asp:Label ID="ReceivedByLabel" runat="server" Text="قام بالاستلام"
                    BorderStyle="None" BorderWidth="0px" ForeColor="Black" Height="35px"
                    style="font-size: 26px; margin-right:5px;  font-family: 'Sakkal Majalla'; text-align: center;"
                    ></asp:Label>
                </td>
                <td>
                </td>
            </tr>
        
        
            <tr>
                <td>
                </td>
                <td>
                     </td>
                <td align="center">
                    <asp:Button ID="PosttheForward" runat="server" BackColor="#6262FF" BorderColor="Black"
                    BorderStyle="Solid" BorderWidth="1px" ForeColor="White" Height="40px"
                    style="text-align: center; font-size: 24px; margin-top: 16px; margin-bottom: 20px; font-family: 'Sakkal Majalla';"
                    Text="حــــول" Width="131px"  />
                </td>
                <td>
                </td>
                <td>
                </td>
            </tr>

        </table>

        <table id="ValidationSummaryTable" runat="server" width="80%">
            <tr>
                
                <td rowspan="5" align="right">
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server"
                    CssClass="ErrorMessage" DisplayMode="List"
                    Height="91px" Width="80%" />
                </td>
                 
            </tr>

        </table>

    </div>


When the "ForwardPosting.aspx" page is loading I want to put a statement that fires "PopUpDiv" which showing a message "You can not forward..." with "OK" button". While the "PopUpDiv" is shown, the Background style turned to be fully grey. When the user press the "OK" button, the user redirected to another page.

The "PopUpDiv" markup:

ASP.NET
<div id="PopUpDiv" runat="server"  class="PopUpDivStyle" visible="false">
<asp:Panel ID="Panel1" runat="server" Width="600px" Height="150px" >
<br />
You can not forward the letter because the period finished. 
You can only make replying.<br class="style2" />
 <br />
<asp:Button ID="PopupButton" runat="server" Height="38px" Text="OK" Width="99px" style="color: #0066CC; font-weight: 700; font-size: medium" />
             
</asp:Panel>
</div>   


So how to preform it using the ModalPopupExtender of the AjaxToolkitControls?

QuestionWCF Data Services & EF - how to call an update stored procedure that does NOT deal with an entity Pin
Duke Carey25-Jan-14 8:02
professionalDuke Carey25-Jan-14 8:02 
QuestionTimeTable with GridView Pin
Prakaz2525-Jan-14 2:59
professionalPrakaz2525-Jan-14 2:59 
QuestionWant to learn ASP.NET Pin
Snehasish_Nandy24-Jan-14 17:25
professionalSnehasish_Nandy24-Jan-14 17:25 
AnswerRe: Want to learn ASP.NET Pin
Richard MacCutchan24-Jan-14 22:05
mveRichard MacCutchan24-Jan-14 22:05 
AnswerRe: Want to learn ASP.NET Pin
trooper081429-Jan-14 3:00
trooper081429-Jan-14 3:00 
QuestionHow to create connection pool in asp.net? Pin
Brijesh Kumar Prajapati24-Jan-14 2:35
Brijesh Kumar Prajapati24-Jan-14 2:35 
AnswerRe: How to create connection pool in asp.net? Pin
Peter Leow24-Jan-14 3:19
professionalPeter Leow24-Jan-14 3:19 
QuestionHow to Show Multi Color Text Box In Asp .net Pin
rajaraman 00724-Jan-14 0:26
rajaraman 00724-Jan-14 0:26 
AnswerRe: How to Show Multi Color Text Box In Asp .net Pin
Ashok Natarajan27-Jan-14 23:03
professionalAshok Natarajan27-Jan-14 23:03 
QuestionError: 404 for webservice in mvc3 website Pin
rohan tangade23-Jan-14 20:10
rohan tangade23-Jan-14 20:10 
QuestionHow to send sms via asp.net(c#)? Pin
Sharath Surendran23-Jan-14 15:34
Sharath Surendran23-Jan-14 15:34 
QuestionRealtime event notification in ASP.NET NVC 4 and C# Pin
Member 1053535323-Jan-14 5:51
Member 1053535323-Jan-14 5:51 
AnswerRe: Realtime event notification in ASP.NET NVC 4 and C# Pin
Richard Deeming23-Jan-14 7:13
mveRichard Deeming23-Jan-14 7:13 
Questionbus reservation - creating dynamic layout for bus seat structur. Pin
Dnyaneshwar@Pune22-Jan-14 21:50
Dnyaneshwar@Pune22-Jan-14 21:50 
AnswerRe: bus reservation - creating dynamic layout for bus seat structur. Pin
thatraja22-Jan-14 23:00
professionalthatraja22-Jan-14 23:00 
AnswerRe: bus reservation - creating dynamic layout for bus seat structur. Pin
Shameel22-Jan-14 23:30
professionalShameel22-Jan-14 23:30 
AnswerRe: bus reservation - creating dynamic layout for bus seat structur. Pin
Bernhard Hiller23-Jan-14 22:14
Bernhard Hiller23-Jan-14 22:14 

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.