|
I recommend you buy a basic book on object oriented programming in whatever language you're using, and read it.
As I said, your control is a member of your class, you can access it's methods and properties from there. Don't make your controls public tho, just expose the properties you want to set, such as the text.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for reply,
i got your point, this part of problem is solved. but one problem is stil there...how can i call user control using C# code? as i mentioned earlier that i want to decide at runtime that how many time user control must be displayed, so how can i do it?
only method i know is to add it in page using HTML code like:
"<uc1:Cube ID=UserControl1 runat=server />"
can i do it on page load within a loop, using C# code?
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
Hi i try to bind the records based on the Id format...,
But i am getting error as "object reference not set to an instance of object"
Here i am binding the datatable to arraylist:(Here i am not getting any probs)
For Each dr As DataRow In dt.Rows
If Not _Text.Contains(dr("Name").ToString) Then
_Text.Add(dr("Name").ToString)
End If
Next
ts = CType(Me.FindControl("TabStrip1"), JQD.TabStrip)
Now based on this arraylist field I am trying to bind other fields in hash table in this format:(Here getting probs it not binding proper format)
It's binding still continious Name Id's,
If any Id will Miss match its show that error...,
Dim _SubTabText As Hashtable = New Hashtable
_Text = New ArrayList
For Each tabtextobj As Object In ts.TabText
Dim tabtext As String = tabtextobj.ToString()
Dim drs() As DataRow = dt.Select("Name='" + tabtext + "'")
Dim _SubText As ArrayList = New ArrayList
For Each dr As DataRow In drs
_SubText.Add(dr("Link")).ToString()
Next
_SubTabText.Add(drs(0)("Id") - 1, _SubText)
Next
ts.SubTabTextCol = _SubTabText
Plz Help me to solve this,
Regards,
Mageshh
|
|
|
|
|
I guess problem is there in following piece of code -
For Each dr As DataRow In drs
_SubText.Add(dr("Link")).ToString()
Next
_SubTabText.Add(drs(0)("Id") - 1, _SubText)
Next
ts.SubTabTextCol = _SubTabText
Why you are using drs(0)("Id") I guses u shud use dr("Id").
Try it I guess it will work, if doesnt then add if condition here too '''If Not _Text.Contains(dr("Name").ToString) Then'''
|
|
|
|
|
Hi Prateek,
Thanks For ur reply...,
I cant give like this,
_SubTabText.Add(drs("MainId") - 1, _SubText)
If i give it will raise error operator '-' is not defined for types 'system.data.datarow' and integer...,
Plz,Give meany other solution...,
Regards,
Mageshh
|
|
|
|
|
Your first port of call should be to step through the code in the debugger. If you can't tell us what line gives you the error, then you've not looked at it hard enough yourself.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello sir,
Thanks For Ur reply,
Actually I amgetting datas in this format in my datatable:
Id Name PNo PName Link
1 Admin 134 Admin Form1..aspx
2 Gen.M 106 Maste frmPr.aspx
3 Hum.R 165 HR123 frmwo.aspx
4 Salar 201 HRsal frmsa.aspx
7 Cashe 126 Cashe frmCa.aspx
8 Chequ 159 Cheqy frmch.aspx
9 Bills 161 Cash1 frmca.aspx
I can able to bind the Name field properly in that tabtext(its an arraylist)...,
Similarly i try to bind the PNames based on the Name field...,
Still that 4th id i can able to bind Names and its Pnames records properly..,
After that id 5th & 6th is not there so its binded 7th,8th,9th Names...,
But in that pnames are not binded based on that Name field 7th,8th,9th...,
Its binded 7th & 8th id's,but its not binded its PNames...,
Its binded that 7th Id PNames In that 9th Id...,
So the probs is binding the PNames...,
Plz tell me some solution for this,
Regards,
Mageshh
|
|
|
|
|
Hi ,
How can i build the menu using the MS Access database fields with javascript.
please help me out, if sample code available
thanks in advance
|
|
|
|
|
Hi folks!
I want to chk the type of machine that is requesting the page of my application so that later on I can redirect it to the appropriate page i.e if a mobile is requesting a page I should redirect it to the page I made for mobiles.
by the way I'm working for the first time in .NET Mobile.
Thanks in advance
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
I guess you can use <a href = "http://msdn2.microsoft.com/en-us/library/system.web.mobile.mobilecapabilities_members.aspx" rel="nofollow">MobileCapabilities</a>[<a href = "http://msdn2.microsoft.com/en-us/library/system.web.mobile.mobilecapabilities_members.aspx" target = "_blank" rel="nofollow">^</a>] class and use IsMobileDevice .
|
|
|
|
|
<br />
string res = Request.Browser["IsMobileDevice"];<br />
if (res == "true")<br />
{<br />
<br />
Response.Redirect("Mobile.aspx");<br />
}<br />
else<br />
{<br />
<br />
Response.Redirect("Desktop.aspx");<br />
}<br />
Thats the way I'm doin it at the moment. does it look alright to u?
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Rocky# wrote: Thats the way I'm doin it at the moment. does it look alright to u?
Is this working perfectly ? I don't think that HTTPBropwserCapabilities having an indexer property.
|
|
|
|
|
well its working and I havent tested it against a mobile :-> I tried to but the simulation wasnt working properly
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Hi all,
we are using the following class SymmetricAlgorithm,
The code is taken from the following url:http://www.codeproject.com/dotnet/encryption_decryption.asp?df=100&forumid=3466&exp=0&select=1007528
Just we have send the key to this algorithm, instead empty.
For the this username :Shannon81 we can't able to decrypt. The encrypt value is "jw= =" this only due to key. if key is given it is working fine. If we remove the key ,the existing username and password is not working. So please provide the solution .
Thanks in advance.
|
|
|
|
|
If i click the datagrid i want the corresponding data to be displayed in a text box?
|
|
|
|
|
ps.srinivasan wrote: If i click the datagrid
Which part of datagrid do you want to click? header or cell or footer or border or something??
It would be great if you can tell us more details and specific about what you really want. then, it is more easier for us to help you. srinivasan
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
thank u for reply
I want to retrive cell Value
|
|
|
|
|
DataGrid will be rendered as HTML table. On ItemDatbound event, get the cell text and make a call to a javascript function on the OnClick event of the cell.
e.Item.Cells[0].Text = "<a onclick="YourJsFunction('" + e.Item.Cells[0].Text
+ "')>" + e.Item.Cells[0].Text + "</a> above code will set the OnClick event for first cell. Cell value will be passed as parameter to the JS function which can be assigned to text box.
Hope it helps
|
|
|
|
|
:(Hi everybody anybody help me!!!
i am having a gridview,in which i placed a template field which contains a
checkbox control.My need is to find whether this checkbox is checked or not.
pls help me in coding(using c#)
SunithaNallana
|
|
|
|
|
Code from this article..
StringBuilder str = new StringBuilder();<br />
<br />
for (int i = 0; i < GridView1.Rows.Count; i++)<br />
{<br />
GridViewRow row = GridView1.Rows[i];<br />
bool isChecked = ((CheckBox) row.FindControl("chkSelect")).Checked;<br />
<br />
if (isChecked)<br />
{<br />
str.Append(GridView1.Rows[i].Cells[2].Text);<br />
}<br />
}<br />
hope it helps..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Thank u very much sir...
its working.
SunithaNallana
|
|
|
|
|
How can take the sql2005 backup
and how can run the sqlbackup
Jaya
|
|
|
|
|
SQL 2005 backup[^]
If you wanna do manually, you can deattach/attach the mdf in SQL 2005 management studio..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
What is the password logic in ASP with C#
How can i write the Code
Jayakrishna
|
|
|
|
|
JKChowdary wrote: What is the password logic in ASP with C#
Password logic ? What is this ? Do you want to know how to store passwords on DB ? Check this[^]
|
|
|
|