Avatar of Mehram
Mehram
Flag for Pakistan asked on

StringBuilder is not writing values on page

Dear Experts
I am using below mentioned query to display result downside to the search boxes. The record is getting against the query is two. but its not writing any thing on page. Neither showing any error.
Please help to fix it
Rgds.
IM


page
code1.txt
C#

Avatar of undefined
Last Comment
Mehram

8/22/2022 - Mon
Jaime Olivares

This is because you are just filling a StringBuilder object but you are not sending/writing it to the page.
You need something like Response.Write(sb.ToString()); at the end of your method.
Mehram

ASKER
It would display result in bottom?
Because response.write was already working I only change it stringbuilder to get result down side the search window
Jaime Olivares

GetResult is returning nothing neither outputing something, which is non-sense.
I don't know where else you put Response.Write but it is not connected with the sb you created in GetResult.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Mehram

ASKER
Sir,
The attached query is showing result after added Response.Write(sb.ToString()); at the end of your method. but I need to place result on the bottom of search criteria. Please help me to do that.

resultcode1.txt
ASKER CERTIFIED SOLUTION
Roopesh Reddy

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Mehram

ASKER
worked. Thanks a lot
actually, This is my first application