Jump to content

nobitavn94

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by nobitavn94

  1. I have a xml file that has structure as follow :<?xml version="1.0" encoding="utf-8" ?><Questions><Level id="1"> <Question> <Id>1</Id> <Q> content of a question...</Q> <O1>..option 1 </O1> <O1>..option 2 </O1> <O1>..option 3 </O1> <O1>..option 4 </O1> <A> correct answer </A> </Question><Question> <Id>2 </Id> <Q> content of a question...</Q> <O1>..option 1 </O1> <O1>..option 2 </O1> <O1>..option 3 </O1> <O1>..option 4 </O1> <A> correct answer </A></Question> .... .... ....</Level><Level id="2"> ... ...</Level>.....<Level id="n">..</Level></Questions>I want to show questions on grid view like this :Level Id Content of question Option 1 Option 2 Option 3 Option 4 Correct answer.by using dataset.I just can show question on grid view like this :Id Content of question Option 1 Option 2 Option 3 Option 4 Correct answerSome code :Dataset ds =new Dataset();ds.ReadXml(...Questions.xml..);gridview.DataSource =ds.Tables[1].gridview.DataBound();How can I add the column Level ( of a question ) ?Thanks in advance !
  2. Thank you .I got the new value .
  3. Thank for your response .I put databinding code like your guidance .But this time,the gridview doesn't show up .Can you give me another tutorial ?
  4. Hi all,I have a grid view control (named GridQuestion) and an xml file.I bound xml file to grid view control as follow :1.Using a dataset to read xml file.2.Assign the dataset to data source property of grid view.3.Databound.In GridVew_RowUpdating event ,I get new value that user enter : protected void GridQuestion_RowUpdating(object sender, GridViewUpdateEventArgs e){ GridViewRow row= GridQuestion.Rows[e.RowIndex]; Textbox txtbox =(TextBox)row.FindControl("txtQuestion"); ....}but I cannot get new value user entered. txtbox.Text contains the old value before user enter.How can I get new value that user enter ?Thank you !
  5. Hi all,At runtime,I want to change image of image control when an event occur (such as user click change image button ).Thank you so much !
  6. Hi all,I want to call a webservice from HTML page using javascript.But I encountered an error:"Object doesn't support this property or method".This error is caused by init function :function Init(){ service.useService("http://localhost/CNLTHD/UniInfoLookup/Service.asmx?WSDL","GetMarksService"); }In body tag,I added :<body onload="Init();" id="service" style="behavior(url:webservice.htc)" onresult="showResult()">My webservice is written in C# ,contained in file Service.asmx Can you help me ?Thank you so much !
  7. Hi all ,Suppose I have an xml file having the struct as follow :<?xml ver="1.0" encoding...><MQA><QAs level="A"> <QA id="1"> <Q> --content of a question---</Q> <O> <a>option 1 </a> <a>option 2 </a> <a>option 3 </a> <a>option 4 </a> </O> <A> option 1</A> </QA> <QA id="2"> .... </QA>...<QAs level="B">...</QAs></MQA>With a given key word ,I want to find out what what QA tag has this key word.This mean that I want to search on xml document.Thank you so much !
  8. Hi all,I'm new in Regular Expression .I want to check if a date string having format dd/mm/yyyy is valid .What expression can I use ?Thank you so much !
  9. Hi all,I need some audio file about gold dragon on TV or audio file that indicate when user win or lost ?Thanks you very much !
  10. In .NET 2005 ,I create a new website .But it doesn't belong to any namespace.I wonder if .NET 2005 has this property .If we create a new class ,how can we use an object of a class in another class (because they don't belong to any namespace)Thanks !
  11. I need some document about Application State and Session Sate in Webservice .Thanks a lot !
  12. Hi all ,I have a table named MasterCard with a column named Code (this column is encrypted with SHA1 algorithm and has data type is varbinary - size 100 )I want to check if a credit card exist in MasterCard table as follow :........SHA1 sha =new SHA1CryptoServiceProvider();byte[] rawBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(cardId); //cardId :credit card codebyte[] hash = sha.ComputeHash(rawBytes);//hashStringBuilder sb = new StringBuilder(hash.Length * 2 + (hash.Length / 8));int i;for (i = 0; i < hash.Length; i++){ sb.Append( BitConverter.ToString( hash, i, 1) );}string encryptedCardId = sb.ToString().TrimEnd( new char[] { ' ' } );........But I cannot use this encryptedCardId to query data even though Code column is also encrypted by SHA1 algorithm .Thanks for any response !
  13. You can lookup it here :www.ebooksclub.org .You must sign up an account before downloading.
  14. Thanks for your response.I sent mail to my mail box.Actually,mail was sent.After 30 minutes it come to mail box,so I think that my program doesn't work.
  15. In .NET 2003 ,I send an email as follow :try{ MailMessage Mess =new MailMessage(); Mess.To=Email; Mess.From=ADMIN_MAIL; Mess.Subject="Welcome to Auction System."; Mess.Body="Activate your account by clicking the link bellow"+"/r/n"; Mess.Body+="http://localhost/Auction/Activate.aspx?activatedcode="+code; SmtpMail.SmtpServer="127.0.0.1"; SmtpMail.Send(Mess);}catch(Exception ex){ Response.Write(.....);}It doesn't raise any exception ,but receiver doesn't receive the mail.I configured Mail Server (localhost) correctly .Help me !
  16. Hi all ,In .NET 2003 ,I use RegularExpressionValidator control to check if a credit card number is valid by using Luhn algorithm .But I don't know to use what expression ...Help me !Thanks a lot !
  17. Hi all !I have a problem that I need your help .I'm using .NET 2003.In login page (has many info user must to fill in ),when user focus an text box used to enter username ,I want to display an button (named Check avalabilty) allowing user to check if the username he has filled is exist (and I done this).But I don't now how to catch clicked event of this button (I want to write the function handling this event in C# because this function has to access to database ).I wonder if my way is correct ???.Here is the code :<script language="javascript">function Focus(){ document.getElementById("spBnCheck").innerHTML="<input type='submit' id='bnCheckUsrName' value='Check avability'>";}</script>Thanks you very much !
  18. Hi ,I have a problem.In admin page,I want to change the Image (Logo of the site) when administrator change the name of it (contained in a dropdownlist).The image is contained in a adrotator control.Can anyone help me ?Thanks you very much !
  19. Hi ,I have a problem.In admin page,I want to change the Image (Logo of the site) when administrator change the name of it (contained in a dropdownlist).The image is contained in a adrotator control.Can anyone help me ?Thanks you very much !
  20. Thanks you very much !But all products are showed three times .I wonder if I made any mistakes ?.Here is my code :<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'><xsl:template match="store"><table bgcolor="#DDEEF7" WIDTH="100%" > <xsl:for-each select="product"> <tr> <xsl:for-each select=". | following-sibling :: product[position() < 3]"> <td> ....some code displaying product info here... </td> </xsl:for-each> </tr> </xsl:for-each></table></xsl:template></xsl:stylesheet>
  21. Hi all,Suppose we have a XML file describe products as follow:<?xml version="1.0" encoding="utf-8" ?><store> <product> <ImageUrl>product1.gif</ImageUrl> <Name>Screen</Name> <Price>12</Price> </product> <product> <ImageUrl>product2.gif</ImageUrl> <Name>Printer</Name> <Price>15</Price> </product> <product> <ImageUrl>product3.gif</ImageUrl> <Name>Printer</Name> <Price>20</Price> </product></store>If we want to show 3 products per a line (and suppose we have many lines) as follow:<table> <tr> <td> ...//product i info </td> <td> ...//product i+1 info </td> <td> ..//product i+2 info </td> </tr> <tr> <td> ...//product i+3 info </td> <td> ...//product i+4 info </td> <td> ..//product i+5 info </td> </tr>..... //product i+n info</table>How can we obtain this by using XSLT ?Thanks a lot !
  22. If we want to draw a vertical line ,which property should we use ?
×
×
  • Create New...