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......
User Profile
Collapse
-
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...Leave a comment:
-
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....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....Leave a comment:
-
the query is
...Code:Select Max(id) from tablename where departmentid=sectionID
Leave a comment:
-
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...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;
Leave a comment:
-
Hi abhi,
If ur using javascript for validation, then use this
In the validation function in javascript...Code:document.GetElementbyId("textboxID").focusLeave 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) {Leave a comment:
-
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...Leave a comment:
-
The problem is in this line
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.Code:SqlDataAdapter da = new SqlDataAdapter(SqlSelect, con);
it must be
Try it and let me know if it works or...Code:SqlCommand = new SqlCommand(urstring,connection); SqlDataAdapter da = new SqlDataAdapter(command);
Leave a comment:
-
Instead of e.RowIndex try GrdviewName.Sel ectedIndex,
Hope it works....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...Leave a comment:
-
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...Leave a comment:
-
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.
ThanksCode:Dataset ds Datatable dt=ds.Tables[0] DataView dv = new DataView(dt); dv.RowFilter = "ColumnName='" +Ur sort Value + "'"; return dv;
Saran...Leave a comment:
-
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...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...Leave a comment:
-
Hi, The problem is in this line,
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;
The '[0]' denotes the index of the datatable in the dataset....Code:DropDownList1.DataSource = ds.Tables[0]
Leave a comment:
-
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
The reason for this is in a real time the database server resides somewhere else, so the...Code:conn.open() cmd.executequery() conn.close()
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
Here u denotes user tableCode:if exists (select * from sysobjects where xtype='u' and name='tablename')
Thanks
Saravanan...Leave a comment:
No activity results to display
Show More
Leave a comment: