Click here to Skip to main content
15,889,808 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionGet original string from Guid Pin
Member 947380913-Aug-14 19:06
Member 947380913-Aug-14 19:06 
AnswerRe: Get original string from Guid Pin
Bernhard Hiller13-Aug-14 21:57
Bernhard Hiller13-Aug-14 21:57 
AnswerRe: Get original string from Guid Pin
Kornfeld Eliyahu Peter13-Aug-14 22:27
professionalKornfeld Eliyahu Peter13-Aug-14 22:27 
AnswerRe: Get original string from Guid Pin
Richard MacCutchan13-Aug-14 22:28
mveRichard MacCutchan13-Aug-14 22:28 
QuestionRe: Get original string from Guid Pin
Member 947380915-Aug-14 18:49
Member 947380915-Aug-14 18:49 
QuestionDynamic Linq Query in vb.net Pin
murali_utr12-Aug-14 18:51
murali_utr12-Aug-14 18:51 
AnswerRe: Dynamic Linq Query in vb.net Pin
Bernhard Hiller12-Aug-14 21:11
Bernhard Hiller12-Aug-14 21:11 
QuestionFetch data from database based checkboxlist selection getting error Pin
Venugopal626412-Aug-14 17:34
Venugopal626412-Aug-14 17:34 
XML
Hi I have 1 checkbox list in that one check box is mobiles and another one is Laptops.
If I check on mobile It wil brings all mobile from DB to My DAtList
If I check on laptop It wil brings all mobile from DB to My DAtList
Here id the code
.aspx
<asp:CheckBoxList ID="CheckBoxList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged">
            <asp:ListItem Value="0">Mobiles</asp:ListItem>
            <asp:ListItem Value="1">Laptop</asp:ListItem>
</asp:CheckBoxList>
.aspx.cs
 protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
    {

        List<String> GetList = new List<string>();
        foreach (ListItem item in CheckBoxList1.Items)
        {
            if (item.Selected)
            {
                GetList.Add(item.Value);
            }
        }
        string str = "select * from ProductDetails where Producttype=@textInput";
        SqlCommand cmd = new SqlCommand(str, con);
        cmd.Parameters.Add(new SqlParameter("@textInput", 0));
        for (int d = 0; d < GetList.Count; d++)
        {
            string text = GetList[d];
            cmd.Parameters["@textInput"].Value = text;
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            da.Fill(ds);
            if (count == 0)
            {

                dc = ds.Clone();
                count++;
            }
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                if (ds.Tables[0].Rows[i].ItemArray[0].ToString() != "NULL")
                    dc.Tables[0].ImportRow(ds.Tables[0].Rows[i]);
            }
            DataList1.DataSource = ds.Tables[0].DefaultView;
            DataList1.DataBind();
        }
    }
}

AnswerRe: Fetch data from database based checkboxlist selection getting error Pin
Bernhard Hiller12-Aug-14 21:14
Bernhard Hiller12-Aug-14 21:14 
QuestionSession variable expires even though session time was set to 9 hours. Pin
Kandepu Rajesh12-Aug-14 9:12
Kandepu Rajesh12-Aug-14 9:12 
AnswerRe: Session variable expires even though session time was set to 9 hours. Pin
Kornfeld Eliyahu Peter12-Aug-14 20:20
professionalKornfeld Eliyahu Peter12-Aug-14 20:20 
AnswerRe: Session variable expires even though session time was set to 9 hours. Pin
Swinkaran12-Aug-14 21:28
professionalSwinkaran12-Aug-14 21:28 
QuestionSession_Start not fire in IIS7 - Windows Server 2008 (64bit) Pin
android_lee11-Aug-14 23:01
professionalandroid_lee11-Aug-14 23:01 
AnswerRe: Session_Start not fire in IIS7 - Windows Server 2008 (64bit) Pin
Kornfeld Eliyahu Peter12-Aug-14 20:29
professionalKornfeld Eliyahu Peter12-Aug-14 20:29 
GeneralRe: Session_Start not fire in IIS7 - Windows Server 2008 (64bit) Pin
android_lee17-Aug-14 21:49
professionalandroid_lee17-Aug-14 21:49 
QuestionHow do I customize the URL users get sent to after logging out (ServiceStack)? Pin
JMK-NI9-Aug-14 23:37
professionalJMK-NI9-Aug-14 23:37 
AnswerRe: How do I customize the URL users get sent to after logging out (ServiceStack)? Pin
Kornfeld Eliyahu Peter10-Aug-14 2:07
professionalKornfeld Eliyahu Peter10-Aug-14 2:07 
Questionproblem after publishing a website Pin
Member 105108496-Aug-14 22:50
Member 105108496-Aug-14 22:50 
AnswerRe: problem after publishing a website Pin
jkirkerx7-Aug-14 10:45
professionaljkirkerx7-Aug-14 10:45 
GeneralRe: problem after publishing a website Pin
Member 1051084911-Aug-14 21:37
Member 1051084911-Aug-14 21:37 
AnswerRe: problem after publishing a website Pin
Bernhard Hiller7-Aug-14 21:33
Bernhard Hiller7-Aug-14 21:33 
QuestionA custom error instead of built in error Pin
ThetaClear6-Aug-14 22:05
ThetaClear6-Aug-14 22:05 
AnswerRe: A custom error instead of built in error Pin
Richard Deeming7-Aug-14 1:47
mveRichard Deeming7-Aug-14 1:47 
GeneralRe: A custom error instead of built in error Pin
ThetaClear7-Aug-14 4:16
ThetaClear7-Aug-14 4:16 
QuestionNee to prepare for Audit trails for my web application Pin
demoninside95-Aug-14 19:57
demoninside95-Aug-14 19:57 

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.