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 8668821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:18:32+00:00 2026-06-12T18:18:32+00:00

protected void GetFinalResult(IQueryable<clsProfileData> result) { if (ddlHeightFrom.SelectedValue != 0 && ddlHeightTo.SelectedValue != 0) {

  • 0
protected void GetFinalResult(IQueryable<clsProfileData> result)
{
    if (ddlHeightFrom.SelectedValue != "0" && ddlHeightTo.SelectedValue != "0")
    {
        int from = Convert.ToInt32(ddlHeightFrom.SelectedValue);      
        result = result.Where(p => Convert.ToInt32(p.Height) > from);
    }
}

I am using Entity Framework 4.0
and in above method p.Height is error causing conversion(string to int).
is there any way to handle this ?

  • 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-06-12T18:18:33+00:00Added an answer on June 12, 2026 at 6:18 pm

    I had an error in converting a string to an Int32. I couldn’t find anywhere in the XML datadescriptions where the field was an Int32. In the end the stored proc was returning that field as an int, not a string. It’s odd that the error messaged complained that it couldn’t cast the data, in the other direction.

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

Sidebar

Related Questions

protected void GridView1_OnRowCommand(object sender, GridViewCommandEventArgs e) { int index = Convert.ToInt32(e.CommandArgument); GridViewRow row =
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { switch (requestCode) { case
Page Load: protected void Page_Load(object sender, EventArgs e) { tb.Columns.Add(Id, typeof(int)); tb.Columns.Add(FileName, typeof(string)); tb.Columns.Add(FilePath,
Please take a look at this: protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { int
protected void Button1_Click(object sender, EventArgs e) { //Uploading file from Computer to Database(server) String
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e) { string input = TreeView1.SelectedValue.ToString(); DataSet ds =
protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); for(int i=0; i<teeth.length; i++) { teeth[i]=(Integer) savedInstanceState.get(Id+[+i+]); if(teeth[i]!=0)
protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position,
protected void Application_BeginRequest(object sender, EventArgs e) { const int maxFileSizeKBytes = 10240; //10 MB
protected void Button1_Click(object sender, EventArgs e) { for (int i = 0; i <

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.