|
You are doing it the right way. What error are you getting.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Thanks Ahsanullah for reply.
linkbutton control is not added to table cell i mean nothing to added into cell.
i have to add linkbuton control to table cells dynamically.
please suggest me where iam doing mistake .
best regards
Rameez
|
|
|
|
|
hopefully you have created tablerow before loop. otherwise code is perfect.
|
|
|
|
|
Here is my complete code
Dim myarray() As Integer = {0, 1, 2, 1, 4, 5, 6, 7, 1, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}
Dim d As Integer
Dim trow As TableRow = New TableRow()
For d = 0 To 31
Dim tc As TableCell = New TableCell
If myarray(d) = 1 Then
Dim lnkbutton As LinkButton = New LinkButton()
lnkbutton.ID = "lnkbutton"
lnkbutton.Text = "Click Here dear "
lnkbutton.PostBackUrl = ""
AddHandler lnkbutton.Click, AddressOf OnClickLink
tc.Controls.Add(lnkbutton)
Else
tc.BackColor = Color.Yellow
End If
tc.Text = " "
trow.Cells.Add(tc)
Next
Table1.Rows.Add(trow)
and here is event handler for that.
Protected Sub OnClickLink(ByVal sender As Object, ByVal e As EventArgs)
FormView1.Visible = True
Dim myConnection As New SqlConnection("Server=localhost;Database=xyz;uid=sa;pwd=xxxx")
Dim ad As New SqlDataAdapter("SELECT * FROM name of table", myConnection)
Dim ds As New DataSet()
ad.Fill(ds)
FormView1.DataSource = ds
FormView1.DataBind()
End Sub
in above code nothing is added to table cell can any body suggest me where iam doing wrong .
Best Regards
Rameez
|
|
|
|
|
Hi I have developed an webpage.This page will run on IE browser for Windows CE 4.2.
I am not being able to set the focus on desired controls after the page posts back.Can anyone help me out?
ARINDAM
|
|
|
|
|
did you try control's method focus()?
|
|
|
|
|
yes.I have used control.focus().
i have even used javascript:document.getElementById('id').focus().
But they are not working.
ARINDAM
|
|
|
|
|
are those controls in ajax?
|
|
|
|
|
No those controls are simple asp.net controls like textboxes.
ARINDAM
|
|
|
|
|
try doing the same in different browser like Mozilla Firefox
|
|
|
|
|
can u suggest me,what version of mozila firefox will support windows ce.net 4.2?I have tried minimo 0.016.But it didn't work.
ARINDAM
|
|
|
|
|
Gentleman,
I am trying to take the results of a query and insert them into a list box. In the code below, I have created an array called siteNumber by applying the query to a "for" loop. The idea was to then use a foreach loop to insert each of the items into a list box. HOWEVER, when I run the code, I get the following error:
Error: The name 'ListBoxSites' does not exist in the current context
Now, the ListBoxSites control freely appears in the intellisense, so I cannot understand the meaning of "does not exist"! I have used the identical format many times with desktop applications, but this is the first time I have ever used it with ASP. Is there a difference? I have posted the code below. Any assistance would be greatly appreciated.>>>Pat
int count = ds.Tables[0].Rows.Count;
string[] siteNumber = new string[count];
int i = 0;
for (i = 0; i < count; i++)
{
siteNumber[i] = ds.Tables[0].Rows[i]["SiteId"].ToString();
}
foreach (string number in siteNumber)
{
//Add to List Box
ListBoxSites.Items.Add(number);
}
|
|
|
|
|
There can be many reasons behind it
1. Make sure that same id(ListBoxSites) is present in aspx part also
2. if you are using VS 2005 and above check designer file for this id ListBoxSites
3. Check the File name Filname.aspx Filname.aspx.cs and class name in Page directive CodeBehind="FileName" Inherits="NameSapce and FileName"
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
THANK YOU...very much for your help and assistance. Actually, what seems to have happened is that I used this page to construct another page and the application got "confused" and did not recognize which page the control was on. But it was your "take a look at" suggestions that got me to thinking about it in a different way. Many thanks for your input. I hope we talk again.....Best Regards, Pat
|
|
|
|
|
Dear All
One of My web application(ASP.Net 1.1 and Sql Server2000) is showing timeout error within 48 hrs.I have to restart SQl Services then only it resolved. Please give your suggestion to resolve this issue as early as possible.
Thanks
Vivek
|
|
|
|
|
Please explain your question. What is the error message? Sql connection timeout error?
|
|
|
|
|
It is showing following Error:
"## Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ##"
|
|
|
|
|
vivek your question isn't much clear, anyhow assuming you deployed on live/test server and you start getting timeout error within 48 hrs. The problem could be with your connections, that is there might be some useless opened connections left. check if its not happening in your case.
|
|
|
|
|
Hi
I want a dropdown list with checkboxs asp.net for multiple selection
your's subbu
|
|
|
|
|
You can’t find any built in controls in asp.net for this purpose. You have to develop your own control or buy any third part controls.
|
|
|
|
|
Hi,
How do i redirect request from one domain to another? For eg, i want to redirect all requests that come to www.abc.com to www.def.com. I own the source code of www.def.com. My company owns the domain www.abc.com but not used yet.
Thanks in advance,
Priya
|
|
|
|
|
This has nothing to do with ASP.NET. You need to contact the domain provider for this.
|
|
|
|
|
Sir, i am a final year Bsc student. For completing a good project in asp.net requires a good amount of money that i cant afford. I am a poor student. So i can afford the fees for studying a project in an institution. So please help me by sending me the source code of a full project done in ASP.NET. So that i can do my project with the guidance of my teachers, friends and peoples like you.
My mail id: sherin2727@rediffmail.com
|
|
|
|
|
I cannot believe this guy. Seriously, look at his previous posts. He's clueless and wants us to do his job for him. Unfreakingbelivable.
Blog link to be reinstated at a later date.
|
|
|
|
|
Gjm wrote: For completing a good project in asp.net requires a good amount of money
I don't think so unless you are going to host it. You will get Visual Studio Express editions which are free. For databases you can use, SQL Server Express edition, MySQL which all are free. So how it will be costly then ?
Gjm wrote: So please help me by sending me the source code of a full project done in ASP.NET
This is not good. You should try something and ask for specific help.
|
|
|
|