|
document.GetElementById('ctl00_MainPlaceHolder1_TextBox1')
should be
document.getElementById('ctl00_MainPlaceHolder1_TextBox1')
The getElementById starts with small letter.
This might be your problem.
use disabled = true / false ;
Cheers.
|
|
|
|
|
thanks for the answers...
but it not a syntax problem... in my question is a write error... sorry...
this is the right source code:
function enableField() {
alert('sdf');
document.getElementById('ctl00_MainPlaceHolder1_TextBox1').disabled = false;
}
hmmm..... i dont know.... f*** js
|
|
|
|
|
i think you should also try
document.form1.txt1.readOnly=true;
hope this will work for you
|
|
|
|
|
i want to send mail through smtp.
if i entered wrong email-ID then it also send
i want to check the email is exist or not before sending.
plz any one can help me,how to fix it.
i want only exist email-id will send other wise it will show message plz check email-id
plz any one can help me,how to fix it.
|
|
|
|
|
|
Hi all
I have Ajax enabled website. Its working fine in my local server (Ajax animation effects are working) but on the server its not working. Pages showing javascript error 'sys' not defined'.
I have added ajax dlls and System.Web.Extensions.dll into website's bin folder.
but does not work.
Many post suggests adding httphandlers and httpmodules like...
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate="false"/>
</httpHandlers>
After adding httphandlers, it starts showing 500 - Internal server error.
and if I remove httphandlers section, it start working but ajax animation does not work.
Have any idea?
ASP.NET 2.0 with IIS 6
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
Hi
I have a user control, which contains a button and gridview. When the user control is loaded in the browser it runs without error. However, when I click the button the button and the gridview simply disappears off the page.
When I view the page on the screen in view source, I noticed that the button doesn't have a unique id. Therefore, I think this may be my problem. Further, when I add a break point to the button, and run in debug mode, the break point is never reached!
The user control that I am having trouble is added to a collection object, which is also itself a user control. The collection object, when I add a button to it directly is fine.
Has anyone come across this problem before? Is the problem unique ids? If so, how do you assign unique ids to user control, and ensure uniqueness when the control is added to a collection?
|
|
|
|
|
ASP.NET takes care of creating unique IDs for each control but prefixing the id of the contained control as appropriate; mycontainer$ctrl01$myButton for instance.
It sounds as though you are having an problem with event bubbling. The click event may be being handled by a parent control.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
The user control is being added dynamically.
Which I need to do, and is probably why the unique ids are not being correctly.
Is there away round this?
|
|
|
|
|
Question:
I would like to take out this link from the loginview and move it to one of the links under a RoleGroup. After doing this, nothing seems to happen when Register link is clicked on.
Any thoughts please?
thanks
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<tr>
<td>
<span>You are not logged in.</span>
</td>
</tr>
<tr>
<td>
<asp:HyperLink runat="server" ID="registerLink"
NavigateUrl="~/Register.aspx" Text="Register"
ToolTip="Go to the registration page"
/>
</td>
</tr>
</AnonymousTemplate>
|
|
|
|
|
Please read the forum guidelines. "Login" is not a very descriptive or informative title.
What do you mean nothing happens? You are not redirected to the registration page?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
you, you are right. I do not get redirected.
It only redirects when the html of the register page is inside the loginview.
Thanks
|
|
|
|
|
I want to create a dynamic report. In my report rows and columns are not fixed, out put should displayed in a grid view.I have one filtration criteria in which i will specify rows and columns.I can add multiple rows and columns. Based on the selected rows and columns the report should be displayed. This is something similar to pivoting. I can't merge columns and rows if i add both rows and columns. I found method for merging grid view , rows and columns separately . If any one know how to merge columns and rows dynamically. Please help .
|
|
|
|
|
|
Hello Friends,
I've a textbox and Button As i click on button it should generate a new row to insert and insert the data into GridView's row from textbox.
Actually i've to save the data into gridview and finally into database from gridview.
|
|
|
|
|
The simplest thing you can do is cast the DataSource of GridView to a DataTable, add a new row to DataTable from TextBox and bind it to GridView on ButtonClick.
|
|
|
|
|
|
Oh, i thought his TextBox and Button are outside Grid.
|
|
|
|
|
LOL..!
ITs a repeated question from Beginners i assume like tht ..!
it may not be true..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Yes you are right.
But let him break the suspence.
|
|
|
|
|
It may be very easier for you to do but not for me. Actually I've to add row with data into gridview using javascript. And i've reached to an extent. But i'm not getting how to insert the record into gridview. I've done to add into a 'tbody' tag. Please suggest me the way or what changes i should make in my code. I'm giving my code below.
{
var myTable = document.getElementById("ctl00_cphAdminMaster_GridView1");
var tBody = myTable.getElementsByTagName('tbody')[0];
var newTR = document.createElement('tr');
var newTD = document.createElement('td');
newTD.innerHTML=document.getElementById("ctl00_cphAdminMaster_txtName").value;
newTR.appendChild (newTD);
//tBody.appendChild(newTR); myTable.appendChild(newTR); }
|
|
|
|
|
Wow Amazing..!
You have to tell your Requirements Exactly wat u r trying to Do ..!
Why Would You want to use java script..!
IF you want to add data You want to add it in Database not in the Grid view..!
tRY TO UNDERSTAND THE framework first..!
If your requirement is like tht..!
REFER THE LINK BELOW
http://www.codeguru.com/forum/showthread.php?t=446823[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hello
i am new one in ASP.net. i am using ASP.net 3.5 with C#.kindly tell me how can i start to create a new web site.i am doing my final year project in it.kindly help me. i want to create a full fledge web site with user login data display etc.but i dont know which part of work is done in which domain like in asp, C#, sql, ajax etc....
i will be thankfull to you.
|
|
|
|
|
I will suggest you to buy some ASP.NET Book and start reading. You can also look into some beginners tutorials from internet.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
If you download and install VS2010 you can create a new website with all of the basics as one of the default project templates (I don't have it at work so can't recall exactly which option but you can play around). It will give you a home page, about page and login (from what I can recall).
Get it here: Visual Studio 2010 Beta 2 [^]
|
|
|
|