Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6227401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:12:24+00:00 2026-05-24T09:12:24+00:00

I am facing this error when i attach specific datasource with dropdownlist. with all

  • 0

I am facing this error when i attach specific datasource with dropdownlist. with all other tables/datasources its working fine.
I am not doing any changes in dropdownlist using javascript/jquery (as its working fine with all other datasource except current)

error:

Invalid postback or callback argument.  Event validation is

enabled using in configuration
or <%@ Page EnableEventValidation=”true” %> in a page. For security
purposes, this feature verifies that arguments to postback or callback
events originate from the server control that originally rendered
them. If the data is valid and expected, use the
ClientScriptManager.RegisterForEventValidation method in order to
register the postback or callback data for validation.

my function to get values from xml files:

public List<ProductReviewmaster> ConvertRssXDocToReviews(XDocument xdoc)
{
    List<ProductReviewmaster> nl = new List<ProductReviewmaster>();

    if (xdoc != null)
    {
        var res = from rs in xdoc.Descendants("item")
                  select new ProductReviewmaster()
                  {
                      Title = rs.Element("title").Value,
                      ShortHeadLine = rs.Element("shortheadline").Value,
                      Link = rs.Element("link").Value,
                      Reviewid = rs.Element("guid").Value ,
                      //Pubdate = Convert.ToDateTime( rs.Element("pubdate").Value),
                      Image = rs.Element("storyimage").Value,
                      Dateline = rs.Element("dateline").Value,
                      Excerpt = rs.Element("excerpt").Value,
                      Tags = rs.Element("tags").Value,
                      ProductId = rs.Attribute("productid").Value.ToInt64()
                  };
        foreach (var item in res)
        {
            nl.Add(item);

        }
    }
    return nl;


}

This is how i am binding it with my dropdownlist:

   ddlReview.DataSource =  prmf.GetReviewByCategoryKey(categoryid);
                ddlReview.DataValueField = "Reviewid";
                ddlReview.DataTextField = "Title";
                ddlReview.DataBind();
                ddlReview.Items.Insert(0, new ListItem("---Select---"));

When i bind same dropdownlist with any other datasource (non-xml) its working fine .. but when i am doing it with this datasource its throwing that above error.

My xml is like:

<rss version="2.0">
  <channel>
    <title>

        </title>
    <link>

        </link>
    <language>en</language>
    <lastBuildDate>
            August  3, 2011  3:57 PM
        </lastBuildDate>
    <image>
      <url></url>
      <link>
            </link>
    </image>
    <items>
      <item productid="">
        <title><![CDATA[This is new test review]]></title>
        <shortheadline><![CDATA[]]></shortheadline>
        <link>

                    </link>
        <permaLink>
          <web>

                        </web>
        </permaLink>
        <guid isPermaLink="false">
                        29527
                    </guid>
        <pubDate>
                        August  2, 2011  1:56 PM
                    </pubDate>
        <MobileText></MobileText>
        <storyimage><![CDATA[ges/apple-appstore.jpg]]></storyimage>
        <categories><![CDATA[mobile]]></categories>
        <dateline><![CDATA[]]></dateline>
        <excerpt><![CDATA[isational structure for its operations in India and South Asia with effetransformational business...]]></excerpt>
        <tags><![CDATA[mobile, phone]]></tags>
        <contenttype><![CDATA[Review]]></contenttype>
      </item>
    </items>
    <description></description>
  </channel>
</rss>

its successfully retriving data and showing on dropdownlist but when i select any item from it (selected index changed) then it shows this message…

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:12:25+00:00Added an answer on May 24, 2026 at 9:12 am

    Finally i resolved the issue…
    while using LINQ, i just used Trim() and its done… 🙂

    var res = from rs in xdoc.Descendants("item")
                              select new ProductReviewmaster()
                              {
                                  Title = rs.Element("title").Value.Trim(),
                                  ShortHeadLine = rs.Element("shortheadline").Value.Trim(),
                                  Link = rs.Element("link").Value.Trim(),
                                  Reviewid = rs.Element("guid").Value.Trim() ,
                                  //Pubdate = Convert.ToDateTime( rs.Element("pubdate").Value),
                                  Image = rs.Element("storyimage").Value.Trim(),
                                  Dateline = rs.Element("dateline").Value.Trim(),
                                  Excerpt = rs.Element("excerpt").Value.Trim(),
                                  Tags = rs.Element("tags").Value.Trim(),
                                  ProductId = rs.Attribute("productid").Value.ToInt64()
                              };
    

    so my final conclusion is there must me problem of blank space with value…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm facing a problem with IE6. I took the toggle function from this website
I am facing this problem and finding solution for this issue since last 2
I am facing a strange error in MOSS 2007 running under Windows 2008. I
I'm trying to run the following code but unfortunately facing Error problems package jskypeexample;
This is my SimpleDBAdapter Class that encapsulates all the complexities of accessing the database
I am facing problem with an Oracle Query in a .net 2.0 based windows
I am facing a problem with .NET generics. The thing I want to do
I have a public facing website that has been receiving a number of SQL
I am facing strange issue on Windows CE: Running 3 EXEs 1)First exe doing
I am facing a problem. I would like to localize my action names in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.