User Profile

Collapse

Profile Sidebar

Collapse
int08h
int08h
Last Activity: Jun 23 '08, 05:58 AM
Joined: Apr 14 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • You are very close to the solution, however it is not a very good practice in XML structure, because XML is a string semantic language, collection element should be presented in a collection wrap, my suggestion is:
    Code:
    <DummyElement name="1" description="first element">
      <ElementData>
        <ElementData name="1.1" attr1="1.1.1" attr2="1.1.2" />
        <ElementData
    ...
    See more | Go to post

    Leave a comment:


  • int08h
    replied to Where i am doing wrong can any body help me
    in .NET
    in page2, you get session value like this:

    string userid = Session("userid ");

    and this is where you got the error in my opinion, try this

    string userid = Session["userid"];

    notice that you were using () while the correct style is []
    See more | Go to post

    Leave a comment:


  • int08h
    replied to resizing contentplaceholder
    in .NET
    ContentPlacerHo lder itself does not render any html, so it may be sth wrong with your layout, I think the layout should be sth like this:

    <div id="head" class="head"></div>
    <div id="footer" class="footer"> </div>
    <div id="left" class="left"></div>
    <div id="main" class="main"><a sp:ContentPlace Holder...
    See more | Go to post

    Leave a comment:


  • int08h
    replied to How to validate password field in c#.net
    in .NET
    assume your password field textbox is named Password, and try this

    string pwd = Password.Text.T oLower();
    See more | Go to post

    Leave a comment:


  • int08h
    replied to Click button when pressing enter key
    in .NET
    if you are developing a WinForm, the "AcceptButt on" property of the form makes sense.
    See more | Go to post

    Leave a comment:


  • IDataReader only implements IEnumerable but not IList, so comparison is not fully supported, a way is to get all data out and make 2 lists, comparison on list is easy
    See more | Go to post

    Leave a comment:


  • int08h
    replied to Date comparison in C#.NET
    in .NET
    try to trim time (hour, minute, second...), just compare the date may make it work correctly
    See more | Go to post

    Leave a comment:


  • int08h
    replied to Resizing the encrypted text
    in .NET
    I dont think it is possible to decrypt a SHA256 encrypted message since SHA256 is an hash algorithm which only provides uni-directional encryption

    in your case, I recommended encrypt with 3-des to ensure speed, then compress it using ZIP algorithm, store it in database or other medium, ZIP is a reversable compression alogrithm so that you can expand the data once you retrieve it from your persistence medium, also 3-des is symmetric...
    See more | Go to post

    Leave a comment:


  • DateTime now = DateTime.Now;
    DateTime past = new DateTime(1997, 1, 1);

    TimeSpan span = now - past;
    int days = span.Days;
    See more | Go to post

    Leave a comment:


  • int08h
    replied to accessing values from hash table
    in .NET
    if (ht.ContainsKey (textBox7.Text) )
    {
    object[] array = (object[])ht[textBox7.Text];
    textBox1.Text = (string)array[0];
    //And so on
    }
    See more | Go to post

    Leave a comment:


  • set a breakpoint at line "if (!IsPostBack)" and observe whether IsPostBack is true or false, if it is true the second time you refresh the page, it is majorly a problem with your web browser
    See more | Go to post

    Leave a comment:


  • int08h
    replied to timer
    in .NET
    As I memorized, three types of timer works similar to each other, but in renference to CLR VIA C#, System.Threadin g.Timer is recommended
    See more | Go to post

    Leave a comment:


  • sorry i've made a mistake
    the FindByText method belongs to ListItemCollect ion class, so the code should be

    subject.Items.F indByText("C++" )...
    See more | Go to post

    Leave a comment:


  • int08h
    replied to Dropdown list in .Net
    in .NET
    There is a way by using ASP.NET AJAX Control toolkit, you can get it from www.codeplex.co m
    See more | Go to post

    Leave a comment:


  • if (subject.FindBy Text("C++") != null) {
    //then C++ exists in dropdownlits
    }
    See more | Go to post

    Leave a comment:


  • int08h
    replied to please explain this program
    in .NET
    OK, I will explain all key points

    first, the method name
    static void show(params object[] b)
    the "params" keyword allows a method to have variable-count arguments, you can call it like
    static void show(1, 2, 3)
    this invocation gives the method 3 arguments (1, 2 and 3)
    in the method arguments is encapsulated in an array, so b is an array of object

    second, the GetType() method...
    See more | Go to post

    Leave a comment:


  • int08h
    replied to Save the data on prevoius page
    in .NET
    if you are requiring input from user, you may consider the Wizard server control

    also, web page do not store any state itself, so you may store all data to session

    Session["MyKey"] = data;

    you can retrieve and encapsulate data to an ArrayList, and once back to data_page, load all data:

    ArrayList data = Session["MyKey"];
    TextBox1.Text = data[0] as string; //just...
    See more | Go to post

    Leave a comment:


  • in Page_Load method
    protected void Page_Load()
    {
    //Only an example, use your way to get ID
    int id = int.Parse(Reque st.QueryString["ID"]);

    if (id == "world tour") //etc...
    {
    TextBox1.Visibl e = false;
    Button1.Visible = false;
    }
    }
    See more | Go to post

    Leave a comment:


  • int08h
    replied to Append variable to string
    in .NET
    Try

    string command = string.Format(" do this command now {0}",textbox1.t ext);
    See more | Go to post

    Leave a comment:


  • in .NET 2.0 it is recommend to use ConfigurationMa nager to access config file

    in order to use ConfigurationMa nager, first add a reference to System.Configur ation assembly

    The code would be

    Code:
    string connStr = ConfigurationManager.AppSettings["AddressDB“]
    Also, AppSettings are string, therefore no need to call .ToString()

    Also again, you can use <connectionStri ngs>...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...