|
Create a template column and do something like
<asp:TemplateField HeaderText="SlNo">
<ItemTemplate>
<%# Container.DataItemIndex + 1 %>
</ItemTemplate>
</asp:TemplateField>
Hope this helps
|
|
|
|
|
ThanQ
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Hi
I am using Visual Studio 2005 to develope a Web Application. I created a Web User Control with a repeater and a button. On the user control the button is under the repeater. When I drag the user control onto a web form the button suddenly appears above the repeater on the web form. Also when I run the application the button is above the repeater.
Has anyone seen this behaviour before?
Thanks.
Kobus
|
|
|
|
|
Sounds like the button is above the repeater to me, either physically, or as a result of some CSS you have going on.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
kbalias wrote: Has anyone seen this behaviour before?
NO. Make sure you are using valid HTML. VS2005 editor will add inline styles to the controls when you drag and drop them. This might be causing the problem. Switch to HTML view and check any unwanted styles are present
|
|
|
|
|
i was binding the gridview.there exist two ids .pertaining to one id there exist one record and pertaining to second id there is no record.first id populate the gridview and when i select the second id , which does noty have any recod, does not empty the gridview.my check is if dataset contains 0 row then the
gridview1.datasource = null;
still it does not empty the gridview
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: my check is if dataset contains 0 row
Dataset can't contain rows. Do you mean a DataTable ?
Sonia Gupta wrote: gridview1.datasource = null;
Are you doing Databind() after this line ?
|
|
|
|
|
no not binding the gridview if table contains 0 row
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
There is no need of checking the row. You can directly bind the datatable to the gridview. If datatable contains rows, it will be shown in GridView. If not it will be blank. So you have to do a DataBind() also in your code. Remove the assigning null
|
|
|
|
|
ThanQ
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
|
You can invisible GridView if table contains 0 row.
if((Dataset.Table[0]==null) || (DataSet.Table[0].Rows.Count==0)
{
GridView1.Visible=false;
}
else
{
GridView1.Visible=true;
}
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
ThanQ
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Hello,
I am bringing a table through a data grid. I Want user can update or delete the data through the grid by clicking a button.
i have loaded the data into the grid but i am unable to make the rows editable,so that user can delete or update it.
Is there any example for this? I am using visual basic asp.net and oracle database.
Thanks,
|
|
|
|
|
prachishah wrote: am unable to make the rows editable
You can use TemplateColumn to make the row editable. Datagrid comes with SelectCommand,EditCommand events. Do the database updation in these events
|
|
|
|
|
Hi all,
how shall we retrieve the selected text of a textbox control in ASP.Net.. is there any possibilities in doing that..
Regards
Sivan.G
|
|
|
|
|
You can work out what text is selected on the client side, but it's not included in the postback data. You could put a hidden control on your page, and use javascript to populate it with the selected text from a text control.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sir
In JavaScript which method can be used to retrieve the selected text of a Textbox.
Thanks in Advance....
Regards
Sivan.G
|
|
|
|
|
hi
i am successfully uploading a image and that path is stored in label
Now what i want is to store that label path(image path) in database not image only path
while i executing this programe i got this error.This is code.I got error at sqlcmd.ExecuteNonQuery().
code:
labelRes1.Text = RadUploadContext.Current.UploadedFiles [File1.UniqueID].FileName;
string imgpath = labelRes1.Text;
SqlConnection sqlcon = new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DiskEra;Data Source=MAINSERVER");
sqlcon.Open();
SqlCommand sqlcmd = new SqlCommand("insert into tblCategories(ImagePath ) values (@ImagePath)", sqlcon);
sqlcmd.Parameters.AddWithValue("@ImagePath",imgpath );
sqlcmd.ExecuteNonQuery();
Response.Write("alert('File is uploaded')");
priority: very very high
regards:
kishore
|
|
|
|
|
kishoregani wrote: priority: very very high
I am still waiting for the day that someone posts a question and puts 'no hurry, whenever you have time'. Ths does not help, your deadline is your problem, we help for free, when we have time. People who pay us, are our 'very very high' priority.
The error means what it says. Your path is too long, you need to make more room in your database for paths.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: I am still waiting for the day that someone posts a question and puts 'no hurry, whenever you have time'. Ths does not help, your deadline is your problem, we help for free, when we have time. People who pay us, are our 'very very high' priority.
I would say it is better here. There is an Indian discussion forum (Lounge Fame sometime back ) http://www.dotnetspider.com/qa/ where the following words are very common:
1) "Please help me"
2) urgent
3) hi <Name>
4) hi everybody
5) Doubt plz explain
6) The same question flooded multiple times
7) All CAPS
|
|
|
|
|
Try increasing the table column size where you are storing the path.
|
|
|
|
|
Hi all,
I am developing an asp.net 2.0 web site with sql2005. i need while openning a record to lock it. that means no body else than the person openning the record right now can enter and edit the same record. Any help????
|
|
|
|
|
You need to add a column where you store the Id of the person who has locked the record. And impliment a method of dealing with a user who locks a record and turns their PC off ( basically you need to also store the time locked, and have locks time out )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for ur reply.
Any links that i may benefit from. I googled a little but is there a link more specific on the topic.
|
|
|
|