What control do I use (or do I not use a control at all...)

Okay so here's the story so far. I am making a blog to be incorporated into a website. Well, I'm doing the blog from scratch.

I'm using MySQL to source all the data via MySQL .NET/Connector. Now while developing the script, I used DataReader and Response.Write to show the blog topics. Now that it has come to put it under a design (I'm using a Master Page for that), I've hit the problem. Response.Write shows all the topics before any of the design elements could be incorporated. So that (more or less) is out of question. So next I looked into the data presentation controls. I looked up GridView, but it is a grid, not a summary of topics. I thought about FormView, but it shows only one topic per page, so that's out of question as well. Paging is important since there might be several topics started. Well, could somebody please suggest a control which can help me get these objectives. Maybe something which acts like Response.Write but does not show up at the top of the page but at the place where the content is supposed to appear. I did think about putting the entire code through Response.Write, but that would pretty much defeat the purpose of having Master Page and I'm willing to consider alternatives first.


Thanks a lot in advance.

1/6/2007 6:28:59 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 4
Get it on Google Play
Get it on Apple App Store

You shouldn't be using Response.Write() for page content like this.  Try using a DataList, if you don't like the grids.  A datalist allows for you to design how the layout of data will be, and then repeats that layout vertically for each record it is given.  This would give a similar effect as the list of Forum topics on this site.
MCP - Web Based Client Development .NET 2.0
1/7/2007 1:54:05 AM
I second that DataList suggestion. I'm using one for my test-blog and it's working well. I still have some things I want to add/adjust, like limiting the amount of records shown, and integrating inline links, but that shouldn't be too hard. So, yeah, a DataList is a good choice for a homegrown blog.
Dell 2400, XP SP2, IIS 5.1, VWD/SQL 2005 Express
1/7/2007 2:22:39 AM

Thanks a lot. I used DataList and sourced the data via DataReader, DataTable and DataView and it worked wonderfully. Earlier I was thinking of putting everything into literals but this is way cleaner. As for paging, I did a bit of coding and that bit is also solved. Thanks a lot once again to both of you.



1/7/2007 8:24:04 AM

Web resources about - What control do I use (or do I not use a control at all...) - asp.net.presentation-controls

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

‘Enough Is Enough’: Obama Demands More Gun Control After Colorado Shooting
President Obama again turned to gun control as a potential solution to the horrific act

Obama pushes for gun control after Colorado shooting
"This is not normal," president says after gunman fatally shoots three people, including police officer, at Planned Parenthood facility

DC Police Chief, “If you’re in a position to try and take the gunman down…it’s the best option for saving ...
... in a position to try and take the gunman down…it’s the best option for saving lives before police can get there,” Yet DC Supports Gun Control ...

The Legend of Zelda: Twilight Princess Wii U will likely support Wiimote and Nunchuk controls
Well this is interesting. Fans have been speculating as to the control schemes that will be supported in The Legend of Zelda: Twilight Princess ...

Mind-Control Bacteria Stop You From Eating Too Much
Gut microbes release proteins that stop the brain from thinking you're still hungry.

Control Your HTPC With Scavenged IR Parts
If you’ve built yourself a home theater PC, one of your highest priorities is probably coming up with a convenient control solution. The easiest ...

ICYMI: Even the AP couldn’t validate any of Hillary’s gun control nonsense
... – not 200 as she claimed . Asked to explain the discrepancy, Clinton’s campaign pointed to 2013 statistics from the Centers for Disease Control ...

Over-The-Counter Birth Control Empowers Women And Pharmacists In Oregon And California
Over-the-counter birth control is coming to Oregon and California. There’s an enactment of new laws on the horizon that will allow pharmacists ...

Colorado embodies nation's divide over gun control
Los Angeles Times Colorado embodies nation's divide over gun control Los Angeles Times People are escorted away from a deadly shooting Nov. ...

Resources last updated: 11/29/2015 4:32:51 PM