|
For IE you can also use innerText. But it won't work in Mozilla. So using innerHTML is better.
Thanks,
Pradipta Basu
|
|
|
|
|
hello
i am using vs2005 and microsoft sql server 2005. In vs->server explorel it does not show me any databases. What is the default path of the data for sql server 2005?
|
|
|
|
|
In Server Explorer try to add new Connection
Stonepit
|
|
|
|
|
I have a custom control with two properties and one overrided method render .. whenever i assign DataTable to one property i preserves it but when the render function is called its value is null
here is my code
<br />
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
namespace Nav<br />
{<br />
[ToolboxData("<{0}:ucMenu runat=server></{0}:ucMenu>")]<br />
public class ucMenu : WebControl<br />
{<br />
DataTable _dtMenu; <br />
string _id;<br />
public ucMenu()<br />
{<br />
<br />
}<br />
public DataTable XMLDataSource<br />
{<br />
get<br />
{<br />
return (_dtMenu);<br />
}<br />
set<br />
{<br />
_dtMenu = value.Copy();<br />
}<br />
<br />
}<br />
public string NavID<br />
{<br />
get<br />
{<br />
return (_id);<br />
}<br />
set<br />
{<br />
_id = value;<br />
}<br />
<br />
}<br />
protected override void Render(HtmlTextWriter writer)<br />
{<br />
writer.Write("<ul id=" + _id + ">");<br />
if (_dtMenu != null)<br />
{<br />
for (int i = 0; i < _dtMenu.Rows.Count; i++)<br />
{<br />
writer.Write("<li><a href=" + _dtMenu.Rows[i]["href"].ToString() + " >" + _dtMenu.Rows[i]["text"].ToString() + "</a></li>");<br />
}<br />
<br />
}<br />
writer.Write("</ul>");<br />
writer.Flush();<br />
base.Render(writer);<br />
<br />
}<br />
}<br />
}
IN HTML i m embedding it as
< MyBar:ucMenu ID="UcMenu1" runat="server" />
and in code behind
protected ucMenu MyBar = new ucMenu();
on top of class
can you please tell me why my datatable refernce to null in render even i have ref it to datatable from property
R A M
|
|
|
|
|
How do you set the XMLDataSource property? in code-behind or in the web page? Are you sure that the value is not null by the time you set the property of the control?
|
|
|
|
|
I m setting through code behind and value is not null when i set it to XMLDataSource property. It assigns the value correctly because i have checked through debugging. I think there is some problem with declaring the control .. isnt it?
R A M
|
|
|
|
|
Rizvi Malik wrote: MyBar:ucMenu ID="UcMenu1" runat="server" />
and in code behind
protected ucMenu MyBar = new ucMenu();
Ah yes, now I look at your sample code again and see the cause: You declare the control in the web page with the id UcMenu1 , meanwhile you declare a new instance MyBar in code-behind, and I guess that you set the property of the second instance other than the first one. In this case, you can declare the control in code-behind like this: (in the version 2.0, you no need to this):
protected ucMenu UcMenu1;
|
|
|
|
|
Thanx alot minhpc_bk .. so nice of you ..
R A M
|
|
|
|
|
Good day. How do i get the data from the database and display in textbox or label. i'm using the asp.net (VB script) to develop the page. Do anyone can help me to solve the problem? Thanks.
Best Regards,
Pei Sun
|
|
|
|
|
I would suggest going to MSDN and working through some of the asp.net tutorials. Asp.net also does not use VB script directly - maybe you mean VB.net.
|
|
|
|
|
Thanks.
Best Regards,
Pei Sun
|
|
|
|
|
Good Day. I have a problem in select the record in the datagrid using radio button. My problem is i have a datagrid with radio button. How can i select one record at a time when click on the radio button? Anyone can give me an example or sample guidelines? Thanks.
Best Regards,
Pei Sun
|
|
|
|
|
you can check this site. this is having so many examples(links) on datagrid. It will be helpfull for you.
http://www.datagridgirl.com/articles.aspx
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks.. I will check it out! Have a nice day.
Best Regards,
Pei Sun
|
|
|
|
|
|
Hi, can someone help me how to open an asp page using the flash getURL property pls?? because it aint opening the page! help me pls!!!
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Hi all
i need to validate the textboxes those are in datagrid.can any one please help me. Thanks alot in advance
Thanks and Regards
Venkat
|
|
|
|
|
You can use asp.net validator controls and also you can use your own javascript to validate the text boxes in the datagrid. If you are using your own javascript then you have to call the javascript function on the click of the submit button and that you can attach in OnItemDataBound event of the datagrid.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks for your valuable suggestion man. But how to get the names of the textboxes. i am not giving any textboxes in edit item template. default textboxes those are predefined i am using. can you please tell me the solution for this. Thanks alot in advance.
Thanks and Regards
Venkat
|
|
|
|
|
you can access that textbox by something like Cells[1].Controls[1] and pass the ID to the javascript function.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks alot man. i will keep in touch with you so that if i got any doubts not only in this, i will let you know.
Thanks and Regards
Venkat
|
|
|
|
|
Sure always welcome.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I've to use web parts in my project and want to store all the values in my own database with own created table. Is there any way to do so. Thanks in advance.
my email id: sanjay@promactinfo.co.in
|
|
|
|
|
Hello sanjay,
This is not possible to store the web parts personalization information in other tables. However you can add the existing ASPNETDB to your database. Personalization information will be automatically stored in the respective table.
|
|
|
|
|
How to Run methods exported by ActiveX Component using JavaScript?
If the ActiveX control is exporting a method, how to invoke it from JavaScript.
|
|
|
|