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

ASP.NET

 
QuestionReferance error Pin
Sagar.H.Mistry18-Nov-09 17:58
Sagar.H.Mistry18-Nov-09 17:58 
AnswerRe: Referance error Pin
Abhijit Jana18-Nov-09 18:06
professionalAbhijit Jana18-Nov-09 18:06 
QuestionTFS BuildDefinition - Environment based dlls Pin
student_rhr18-Nov-09 12:50
student_rhr18-Nov-09 12:50 
AnswerRe: TFS BuildDefinition - Environment based dlls Pin
The Man from U.N.C.L.E.18-Nov-09 13:28
The Man from U.N.C.L.E.18-Nov-09 13:28 
GeneralRe: TFS BuildDefinition - Environment based dlls Pin
student_rhr18-Nov-09 13:40
student_rhr18-Nov-09 13:40 
GeneralRe: TFS BuildDefinition - Environment based dlls Pin
The Man from U.N.C.L.E.18-Nov-09 22:10
The Man from U.N.C.L.E.18-Nov-09 22:10 
QuestionRemove character from string problem ASP.NET VB Pin
rbren9018-Nov-09 12:22
rbren9018-Nov-09 12:22 
AnswerRe: Remove character from string problem ASP.NET VB Pin
PunkIsNotDead18-Nov-09 13:42
PunkIsNotDead18-Nov-09 13:42 
Maybe you can try this... it works fine Smile | :) (just pass C# to VB.NET)

Wink | ;)

On The Code of the page is:

<asp:UpdatePanel ID="UpdPnl_Test" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <table>
                <tr>
                    <td>
                        Text to Convert</td>
                    <td>
                        <asp:TextBox ID="Txt_Convert" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Chars to Quit</td>
                    <td>
                        <asp:TextBox ID="Txt_CharsToQuit" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button ID="Btn_Submit" runat="server" Text="Button" 
                            onclick="Btn_Submit_Click" />
                    </td>
                </tr>
                <tr><td>Reversed Text: </td>
                    <td>
                        <asp:Label ID="Lbl_ReversedText" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr><td>Quitted Chars: </td>
                    <td>
                        <asp:Label ID="Lbl_QuittedChars" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Btn_Submit" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>


and the Codebehind is:

protected void Btn_Submit_Click(object sender, EventArgs e)
{
Lbl_QuittedChars.Text = String.Empty;
            Lbl_ReversedText.Text = String.Empty;
            if (!String.IsNullOrEmpty(Txt_Convert.Text))//if the string isn't empty
            {
                if (!String.IsNullOrEmpty this.Txt_CharsToQuit.Text))//if the string isn't empty
                {
                    string StoreResult = Txt_Convert.Text;
                    foreach (char CharToRemove in Txt_CharsToQuit.Text)
                    {//we go over every char to quit in the string
                        Txt_Convert.Text = Txt_Convert.Text.Replace(CharToRemove.ToString(), "");
                        //Replacing every char on the text
                        Lbl_QuittedChars.Text += CharToRemove;//to show the chars removed
                    }
                    for (int i = Txt_Convert.Text.Length - 1; i &gt;= 0; i--)
                    {
                        Lbl_ReversedText.Text += Txt_Convert.Text.Substring(i, 1);
                    }//we print the chain reversed
                    Txt_Convert.Text = StoreResult;//Restore the original value of the text

                }
                else
                {//if the user don't want to quit any char
                    for (int i = Txt_Convert.Text.Length - 1; i &gt;= 0; i--)
                    {
                        Lbl_ReversedText.Text += Txt_Convert.Text.Substring(i, 1);
                    }//we print the chain only reversed
              }
}//End if !String.IsNullOrEmpty(Txt_Convert.Text)
}


is 100% functional!! Laugh | :laugh: Smile | :)
Questionchild listview Pin
Tauseef A18-Nov-09 11:59
Tauseef A18-Nov-09 11:59 
QuestionUser Controls Pin
samir8018-Nov-09 11:17
samir8018-Nov-09 11:17 
AnswerRe: User Controls Pin
Abhishek Sur18-Nov-09 11:27
professionalAbhishek Sur18-Nov-09 11:27 
Questionwhen you have an example explain it properly please. Pin
macupryk18-Nov-09 10:26
macupryk18-Nov-09 10:26 
AnswerRe: when you have an example explain it properly please. Pin
Abhishek Sur18-Nov-09 10:57
professionalAbhishek Sur18-Nov-09 10:57 
GeneralRe: when you have an example explain it properly please. Pin
macupryk18-Nov-09 11:12
macupryk18-Nov-09 11:12 
GeneralRe: when you have an example explain it properly please. Pin
Abhishek Sur18-Nov-09 11:25
professionalAbhishek Sur18-Nov-09 11:25 
GeneralRe: when you have an example explain it properly please. Pin
macupryk19-Nov-09 1:03
macupryk19-Nov-09 1:03 
QuestionOnclick execute multiple functions mixed .net and javascript functions Pin
WizTAK18-Nov-09 10:06
WizTAK18-Nov-09 10:06 
AnswerRe: Onclick execute multiple functions mixed .net and javascript functions Pin
Abhishek Sur18-Nov-09 11:01
professionalAbhishek Sur18-Nov-09 11:01 
AnswerRe: Onclick execute multiple functions mixed .net and javascript functions Pin
PunkIsNotDead18-Nov-09 12:43
PunkIsNotDead18-Nov-09 12:43 
Questionlistview issue [modified] Pin
Tauseef A18-Nov-09 7:33
Tauseef A18-Nov-09 7:33 
AnswerRe: listview issue Pin
Abhishek Sur18-Nov-09 7:41
professionalAbhishek Sur18-Nov-09 7:41 
QuestionRe: listview issue Pin
Tauseef A18-Nov-09 12:02
Tauseef A18-Nov-09 12:02 
AnswerRe: listview issue Pin
Abhishek Sur18-Nov-09 23:13
professionalAbhishek Sur18-Nov-09 23:13 
AnswerRe: listview issue Pin
ranjan_namitaputra18-Nov-09 8:34
ranjan_namitaputra18-Nov-09 8:34 
Generallistview issue Pin
PunkIsNotDead18-Nov-09 10:00
PunkIsNotDead18-Nov-09 10:00 

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.