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

  • Home
  • SEARCH
  • 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 959803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:04:58+00:00 2026-05-16T01:04:58+00:00

public string DefString { set; private get; } private string path = http://someuri.org/search?Par1=15&Par2=55; public

  • 0
public string DefString { set; private get; }
private string path = "http://someuri.org/search?Par1=15&Par2=55";
public string GetAnswer()
{
    WebRequest myRequest = WebRequest.Create(path);

    WebResponse myResponse = myRequest.GetResponse();

    StreamReader sr = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.Default);
    return sr.ReadToEnd();
}

My function GetAnswer() returns string like this:

(function(){if (typeof samo === "undefined") { samo = {}; }samo.ROOT_URL = '/search_tour?';samo.jQuery(samo.controls.resultset).html('<table class=\"res\"><thead><tr><th>DATAColum1</th><th>DATAColum2</th><th class=\"c\">DATAColum3</th><th>DATAColum4</th><th class=\"c\">DATAColum4</th></tr></thead><tbody><tr class=\"red_row\" samo:TOWNFROMINC=\"557\"><td nowrap>DATA1</td><td>DATA2</td><td class=\"c\">7</td><td>DATA3</td><td class=\"c\">DATA4</td></tr<span class=\"fr_place_l N\"></span></td></tr></tbody></table>');})();

What shall I do?
I have two ways to build the table. First is to create some function that enable to convert this string to object DataTable, then I have to do something like this:

 <% foreach (System.Data.DataRow row in Model.Rows) { %>

        <%= row["column"].ToString(); %>   

 <%}%>

But It’s no good way.

Second solution is to convert AnswerString into simple html table and then send it to ViewUserControl. But this way not so good as I want.

I have to use some component like DataTable , but I can not find any examples how to use it(C# MVC). Could you give me example how to use it?

For Example you have database NorthWind.mdf, DataTable control and some DropDown. If you change something in DropDown, Data table have to get new data.
Please don’t use DataSourses like:

    <asp:SqlDataSource ID="TourDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
        SelectCommand="SELECT [ID], [Name] FROM [TABLE]">
    </asp:SqlDataSource>

Could you give me good advice What should I do with AnswerString?

Thank for your solutions and advices=)

  • 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-16T01:04:58+00:00Added an answer on May 16, 2026 at 1:04 am

    Take a look at .html( htmlString ) at http://api.jquery.com/html/

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

Sidebar

Ask A Question

Stats

  • Questions 507k
  • Answers 507k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer A list function runs in a separate process (couchjs) which… May 16, 2026 at 4:03 pm
  • Editorial Team
    Editorial Team added an answer This is a line break in a WrapPanel: <WrapPanel> <TextBlock… May 16, 2026 at 4:03 pm
  • Editorial Team
    Editorial Team added an answer You should be able to perform a complete XSLT in… May 16, 2026 at 4:03 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have two ViewModels: public class CommandViewModel { public string DisplayName { get; set;
I have a class: public class Car { public string Model {get;set;} public string
I want to convert from public class Party { public string Type { get;
let's say i have this public class MyClass { public string myMessage { get;
Using GWT I have a Java class: public class Pojo { private String name;
class Unit { private readonly string name; private readonly double scale; public Unit(string name,
I've got the following enum: public enum myEnum { ONE(ONE), TWO(TWO); private String name;
The code: public String getTemperatureMessage(double temp) { if(temp < 32) return Freezing; else if(temp
i have this model on mvc: public class User { public string Name {
In action method (JSF) i have something like below: public String getFile() { byte[]

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.