User Profile

Collapse

Profile Sidebar

Collapse
saran23
saran23
Last Activity: Mar 17 '08, 04:10 AM
Joined: Mar 3 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • saran23
    replied to Convert String to Imagename
    in .NET
    Hi,
    Im not sure how to implement this, but try this,
    1.Create a image at run time,
    2.set the string to the ID of the image,
    3.now set the height property,

    hope this works, ur image will have the name of the string value, and u can set the height too......
    See more | Go to post

    Leave a comment:


  • The code seems to be free from bugs, so I think u have not set teh Autopostback property(as the other person has mentioned).
    One more thing for situatios like this where u check a single value in multiple statements, Its better to use Switch than using If Else Statements,
    It will boost the performance.as in if statements all the conditions are checked even if the 1st one is correct.

    Think of this, U have nearly 100 conditions...
    See more | Go to post

    Leave a comment:


  • saran23
    replied to Convert String to Imagename
    in .NET
    If Ur using the name of the image as string,it wont hav the height property,
    try this create a image at run time, name it with the string value, and set the height.

    If ur some more clear it will be easy to help u correctly....
    See more | Go to post

    Leave a comment:


  • try using Javascript, I think its possible with only Javascript, when the page gets unloaded the memory for the objects used is cleared, so u might not get Response.Redire ct work....
    See more | Go to post

    Leave a comment:


  • saran23
    replied to find the max value throw the dlink
    in .NET
    the query is

    Code:
    Select Max(id) from tablename where departmentid=sectionID
    ...
    See more | Go to post

    Leave a comment:


  • saran23
    replied to plz help me in .net
    in .NET
    Just give conn.open() before the ExecuteNonQuery statement and in the very next line close the connection by giving conn.Close()

    In the page load too u have never closed the connection. a connection must closed immediately after the command is executed. Or else the connection will cause network congestion.

    One main thing,
    U have specified the connection in page load, it is Protected function and u cant use the...
    See more | Go to post

    Leave a comment:


  • I suggest using the Datatable u created as the datasource for the grid.instead of using the dataset.

    just try this

    Code:
    Datagrid.Datasource=Datatablename;
    ...
    See more | Go to post

    Leave a comment:


  • saran23
    replied to Control back to TextBox
    in .NET
    Hi abhi,
    If ur using javascript for validation, then use this
    Code:
    document.GetElementbyId("textboxID").focus
    In the validation function in javascript...
    See more | Go to post

    Leave a comment:


  • I think ur not getting me right,
    U wont get any error, but when u Click the save button, the values u changed will be losed,and values from the database will be got again and the textboxes will hold this old value, this old value will be updated in the Database,

    See the below code for reference.
    I will bet money, this will work.

    Code:
    protected void Page_Load(object sender, EventArgs e)
        {
    ...
    See more | Go to post

    Leave a comment:


  • saran23
    replied to JavaScript Functions And C#.NET
    in .NET
    Hi u can make use of a string and write the javascript inside it and call the string in Response.Write.
    The other way is RegisterClientS cript.
    It would be better to use the second one, for that u hv to learn it from any site.or MSDN...
    See more | Go to post

    Leave a comment:


  • The problem is in this line
    Code:
    SqlDataAdapter da = new SqlDataAdapter(SqlSelect, con);
    Ur just giving a string as parameter, u hav to pass the command object as parameter, and the string must be used for the command object not here.

    it must be

    Code:
    SqlCommand = new SqlCommand(urstring,connection);
    SqlDataAdapter da = new SqlDataAdapter(command);
    Try it and let me know if it works or...
    See more | Go to post

    Leave a comment:


  • saran23
    replied to Row Updation In Grid View Using C#
    in .NET
    Instead of e.RowIndex try GrdviewName.Sel ectedIndex,
    Hope it works....
    See more | Go to post

    Leave a comment:


  • Hi Nanditha,

    Ur problem is simple,The code u have used is absolutely correct, no problem in that, the problem is ur binding the values in textboxes from Database, Ur doing this in PageLoad event right?

    When u change the values in textboxes and click Save button the page gets PostBack and again the values in Database is binded in textboxes, ur updated values are lost.

    To avoid this,In the Pageload, put...
    See more | Go to post

    Leave a comment:


  • saran23
    replied to building up a control with vb.net
    in .NET
    Hi Sheena,
    Ur not much clear.
    U can build a control and assign a value at run time,
    Is this ur asking? or something else?
    try to make me clear so that i can help u.

    Thanks
    Saran...
    See more | Go to post

    Leave a comment:


  • saran23
    replied to Sorting Dataset
    in .NET
    Hi pooja,

    I think this might help u...

    put the dataset into a datatable and then to a dataview.
    In dataview u hav the sort property.

    Code:
    Dataset ds
    Datatable dt=ds.Tables[0]
     DataView dv = new DataView(dt);
            dv.RowFilter = "ColumnName='" +Ur sort Value + "'";
            return dv;
    Thanks
    Saran...
    See more | Go to post

    Leave a comment:


  • saran23
    replied to select only one option
    in .NET
    Hi Neeraja,

    Set autopostback property of the radio button to true, then in the OnSelected event of the radio button make the textbox disable.
    Do the reverse for the enabling purpose., but check if the radio button is selected in the onselected event, If its checked then enable the textbox.

    Try this, Dont ask for prewritten code, it will no way help u in future..

    its a simple one, try, if ur not...
    See more | Go to post

    Leave a comment:


  • Hi,
    I have an idea to implement , Just try Im not sure this might be a correct solution,
    here goes..
    1.First create a datatable with rows and columns based on the array structure, 2.using a foreach loop, write the array items to this datatable,
    3. Then bind this datatable to the gridview.

    After trying this Let me know It works or not....

    Thanks
    Saran...
    See more | Go to post

    Leave a comment:


  • saran23
    replied to populate dropdown items via stored procedure
    in .NET
    Hi, The problem is in this line,
    Code:
    DropDownList1.DataSource = ds;
    ur binding a dataset to a dropdownlist, a dataset may contain more than one table also, so there comes the problem, even if u hv used Datamember,the table name to which the "NameList" column belongs is not specified,So u hv to do this,

    Code:
    DropDownList1.DataSource = ds.Tables[0]
    The '[0]' denotes the index of the datatable in the dataset....
    See more | Go to post

    Leave a comment:


  • saran23
    replied to Problem with DataReader
    in .NET
    Hi Swetha,
    Going thru ur code, I found some mistakes,
    I could not say the exact reason for the exception,but theres a lot to change in ur code,
    1. Connection.Open () must be used carefully, it must be used just before executing the command, it must be

    Code:
    conn.open()
    cmd.executequery()
    conn.close()
    The reason for this is in a real time the database server resides somewhere else, so the...
    See more | Go to post

    Leave a comment:


  • Hi,
    use this Query in the sqlcommand and check whether the table exists or not,
    U can use a SP or a direct query in Sqlcommand,
    The query returns a boolean value,

    Here goes the query
    Code:
    if exists (select * from sysobjects where xtype='u' and name='tablename')
    Here u denotes user table

    Thanks
    Saravanan...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...