Jump to content

homiee

Members
  • Posts

    31
  • Joined

  • Last visited

homiee's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi everybody!I have this table:ID | Type | Serial----------------------1 | 2 | 5122 | 1| 5133 | 2 | 5144 | 1 | 5155 | 2 | 516What is the SQL SELECT statement, which returns a table like this:Type | Count---------------1 | 22 | 3(Count means number of times showed)thanks!
  2. Thanks alot! it works great!
  3. SqlDataAdapter myCommand = new SqlDataAdapter("SELECT * FROM BuyIDtable WHERE UID=\'" + UID + "\' ORDER BY BuyID DESC", myConnection);Maybe I can make a different dataset with a different repeater for the "Type" Column? -SqlDataAdapter myCommand = new SqlDataAdapter("SELECT Type FROM BuyIDtable WHERE UID=\'" + UID + "\' ORDER BY BuyID DESC", myConnection);<...><do whatever it needs to do in order to change Type 1 to Yes and Type 0 to No>myCommand.Fill(ds2);Repeater2.DataSource = ds2;Repeater2.DataBind();And then make Repeater2 show in Repeater1 where the type column is?Thanks!
  4. Thanks for the fast reply!But it seems there's an error:Input string was not in a correct format.Couldn't store <NO> in Type Column. Expected type is Int32.The "Type" column in Int32... but why should it matter as long as it's in a dataset?
  5. Hi everyone!I have this code:SqlConnection myConnection ...SqlDataAdapter myCommand ...DataSet ds = new DataSet(); myCommand.Fill(ds); Repeater1.DataSource = ds; Repeater1.DataBind();Assuming this code creates a table from the data collected from the SQL databases in Dataset "ds"so that will be ds.Tables[0]Table should look like this:ID | type | name | amount | date-------------------------------5 | 1 | homiee | 500 | 23/12/200710 | 0 | horsy | 208 | 10/20/2007my question is - is there any way to alter the data inside the table?let's say I want to change the data in the dataset (not in the database) - I want to change ALL types that equals to 1 to "YES" and all types that equals to 0 to "NO", what's the method?thanks!
  6. Problem solved... problems with validators
  7. You can use 2 linkbuttons.One is visible and one is invisiblein C# is looks something like this:<script runat="server"> public void disappear(object s, EventArgs e) { LinkButton1.Visible = false; LinkButton2.Visible = true; } public void runcode(object s, EventArgs e) { LinkButton2.Visible = false; Response.Write("bahhh"); }</script> ...<asp:LinkButton ID="LinkButton1" runat="server" OnClick="disappear">LinkButton</asp:LinkButton><asp:LinkButton ID="LinkButton2" runat="server" OnClick="runcode" Visible="false">LinkButton2</asp:LinkButton>... The output of this will be:A. LinkButton 1 showsClick on LinkButton 1B. LinkButton 1 disappears and LinkButton 2 appearsClick on LinkButton 2C. LinkButton 2 disappears and calls runcode()D. "bahhhh" is returned
  8. Hi!I have Masterpage with a table with 2 rows, in the upper row there is an image and in the lower row there is a Contentplaceholder.It works but it seems that when the CONTENT of the CONTENTPLACEHOLDER is bigger than the size of the LOWER ROW the conent is being clipped (shows for example only half of the content)when I increase the size of the row the content is shown but then when the content of the contentplaceholder is for example one sentence of text I get a page of blank space (because of the size of the row)is there a way to correct this issue?thanks!
  9. Hello,I've been coding a site for a week now using MSSQL and C# ASP.NET.I just found out that the webhosting server does not support MSSQL.How different is MSSQL from MySQL? (it seems very very like)Will it be possible for me to change the code to support MySQL?thanks!
×
×
  • Create New...