Web Forms :: There Is No Row At Position 0
May 27, 2012
I am having a page where on load i need to retrieve an image and some values from table (sql server) i am able to retrieve the data but i am getting an error while retrieving the image
string Id = Request.QueryString["cproduct_id"];
String strConnString = System.Configuration.ConfigurationManager.ConnectionStrings["conString"].ConnectionString;
SqlConnection connection = new SqlConnection(strConnString);
SqlDataAdapter sda = new SqlDataAdapter();
DataTable dt = new DataTable();
[Code] .....
**this is the error i am receiving " There is no row at position 0. "
View 1 Replies
Similar Messages:
Jan 13, 2010
i have a div in my page, with position absolute i want change the position TOP if i write;
div.style.remove("top")
style.add("Top","300")
does not happen nothing.
do you know how can i do it?
View 4 Replies
Feb 9, 2012
I am creting the application in which i have droped some images to div.I want to set image position.The images which i m going to drop are dynamically binded to another div.The images I m dropping to div must not be overlapped,and after end of the last corner of div the next image should drop from first position but the image already at that position must not overlapped.
View 1 Replies
Dec 15, 2010
I work with Visual Web Developer 2010 I arrange the controls using the Format menu / position / absolute.When I run the page I have buttons that change of position should I use tables to put the controls?
how to set the page width to not have the horizontal scrollbar.
View 1 Replies
Apr 7, 2010
i used the dropdown list in user control.when i select the dropdownlist that scroll bar went to top.how can i maintain the scroll bar position in that situation?
View 3 Replies
Jan 19, 2011
I am getting this error"System.IndexOutOfRangeException: There is no row at position 0." same code and concept working fine in 2 websites i could not able to solve this,only difference between current implementation and earlier implementation database,previously i used MySql database and now Ms-Excel data.I debugged data set is retreiving Code
Protected Sub chkSelect_CheckedChanged(ByVal sender As Object, ByVal e As
System.EventArgs)
Dim indx As Integer
Dim strExcelConn As String =
[code...]
View 3 Replies
Apr 22, 2010
Is there anyway in .NET to get an image offset position in the webform?Javascript can get this information from the "offsetX" and "offsetY" values but are there anyway to get the same info in .NET?Or can I use javascript to catch the info and send it to the backend? Like creating a hidden input field with the data and then read the data from the code behind?
View 1 Replies
Oct 5, 2010
How can i change control position in aspx page at runtime Is it possible through xml / xslt files with out re-depoying the code.
View 2 Replies
Aug 13, 2010
I have found many articles claiming to show you how to set the scroll position of a ListBox, but what they really end up showing you is how to set the SelectedIndex of a ListBox.
Here is what I need: a databound ListBox that's usually going to have around 25 items in it. When the page loads, ALL of the items in the ListBox are selected, and the ListBox is scrolled all the way to the bottom.
I've got the "All items Selected" requirement already, but I can't figure out how to get the "Scroll to the bottom" done.
View 4 Replies
Mar 26, 2016
I have component panel1 in the form width=600 heigt=300. But i want change position panel. Always panel be i center form.
View 1 Replies
Oct 11, 2010
On Button Click how to move the mousecursor position in web application???
In case of windows application on button_click i have written the following code:
Point p = new Point();
p.X = 41;
p.Y = 400;
Cursor.Position = p;
This works fine & cursors position also change.
but how to do that on aspx page or in web application?
In my case also on button click i have to move the cursors position.
View 1 Replies
Feb 9, 2010
I have a asp .net panel with scrollbar enabled .The panel contains buttons which is dynamically added to the panel. Is there any way to keep panel scrollbar position centered.
<asp:Panel
ID="pnlYear"
ScrollBars="Vertical"
runat="server"
Height="460"
></asp:Panel>
pnlYear.Controls.Add(GetYearName());
private
Table GetYearName ()
{
Table tblYear =
new Table();
tblYear.ID = "tblYear";
for (int i = 1900; i <
DateTime.Now.Year; i++)
{
Button btnYear =
new Button();
btnYear.Text = i.ToString();
TableRow rw =
new TableRow();
TableCell cell =
new TableCell();
cell.Controls.Add(btnYear);
rw.Cells.Add(cell);
tblYear.Controls.Add(rw);
}
return tblYear;
}
View 8 Replies
Nov 23, 2010
I have a web page in which i have some validation after textbox lostfocus but i want that If Error occurs then text box changes their position and as soon as user corret that error text box set it on its original position how can i do it
View 2 Replies
Feb 1, 2010
I have a page that uses AJAX updatepanels. On this page, we have some radio buttons with Autopostback set to true. The problem is that after the postback, the control was losing focus so that when the user would hit tab, control would be restored to the first control on the page and not the drop-down which fired the event. As a fix, I wrote some set focus code in the radio button's oncheckchanged event. This seems to have fixed the problem with the focus. The problem I have is that the browser loses its scroll position every time I click on one of these radiobuttons. Is there a way to maintain scroll position? Maybe there is another way to resolve my original problem of setting focus that will prevent this from happening.
View 6 Replies
Jul 23, 2010
How can we retain Panel scroll position on postback without using any cookies.
View 6 Replies
Jan 30, 2010
I'm designing a new site using CSS instead tables to position elements.Until now I was working only with tables.The tests were working well but when I use master pages and try to define the positioning of the page elements inside a content page it not works. The elements are inside a div. The div position is ok but the position of the div elements is not ok at runtime.More strange is that in design mode all works well ...I'm using VS2008.
View 8 Replies
May 27, 2010
When add elements, like text or other controls inside a big <div> block, they are alwasy on the top.
Ex. <div style="height:50px;">this is a test</div>
Does anyone know how to use CSS to position them in the middle of it? I tried using CSS vertical-align, no luck.
View 1 Replies
May 6, 2010
I have a ListView on my webform and want to display some text and a button to the right of the ListView ("to remove this list and all its items click <asp:button text="Remove List">)
I don't seem to be able to achive this, above, in, below yes but not right/left.
View 2 Replies
Sep 10, 2010
I have taken a div inside the UserContol.
this usercontrol is placed in a page having master page.
In div i have checkboxlist control .
I want to preserver scroll position of while postback.
I have also used UpdatePanel in which i have placed this user control.
I have also triedMaintainScrollPositionOnPostback="true"
but does not work.
My page structure is this:
Masterpage > contentplacehoder (child Page) > UpdatePanel > User control > div > asp:CheckboxList
View 4 Replies
Jul 19, 2010
I want to maintain the scroll position of a page. So I try to get the page cordinates and set the position on the page load (actually I've a postback in my page) using JS as follows. What I've done is on a client click on an image get the page cordinates and keep in a hidden field.
[Code]....
GetScollerPosition function invoke in an image click event. But it's not work as I expected, the SetScrollPostion always find the value of hidden fields as zero.
View 8 Replies
Sep 20, 2010
how to detect the IP position of my website user ?
View 12 Replies
Jan 13, 2011
The only thing that works in the code below for me is that it does display, so I know that I am dealing with the cotrect control. But I can't get the position to change.
[Code]....
View 1 Replies
Oct 28, 2010
Is there anyway to define the screen position after a postback?
Specificaly i'm referring to the vertical scroll position. Some of my controls are set to AutoPostback = True. Depending on their selected value it then reveals a hidden ASP.Net panel and some more questions.
Problem is that with each post back the page refreshes at the top and i have to scroll back down to my question. I can use the .focus() control, that's fine, but it doesn't work as perfectly as i'd like. Is there any way of defining how many lines or pixels the screen is already scrolled to upon postback?
View 4 Replies
Feb 23, 2011
I have a usercontrol which is used for search. Depending on which page the usercontrol is I have change the position of controls.
View 2 Replies
Feb 5, 2010
Is it possible to change the position of the ListItem box on a CheckBoxList? I need to have something like:
[Code]....
I'm creating the ListItems dinamically with data coming from a DB and assigning one value ListItem.Name and another to the ListItem.Value. Probably each entry on the CheckBoxList will need to be something like
----------------------------------------------------------------
| label | ListItem with only Value and no Name |
----------------------------------------------------------------
How can I do this?
View 4 Replies