|
Sachin Dubey wrote: That is not any Variable...That is just i written...
How we know its simply written.
Ok.Try ddlSubCategory.options.length
|
|
|
|
|
Thanks Arun I Got The count By :
if (document.getElementById("<%=ddlSubCategories.ClientID%>").options.length > 1)
Now its showing the message also...But Its Saving the record ...
My Code of Button is:
<asp:button id="btnSave" runat="server" text="Save" width="100px" onclientclick="javascript:validate();" onclick="btnSave_Click">
After reading that script it reading On_click event Code...
How to Tackele that..
|
|
|
|
|
Sachin Dubey wrote: OnClientClick="javascript:validate();"
Instead try this,
OnClientClick="return validate();"
|
|
|
|
|
Hey Arun... It Works...
Thanks A Lot....
|
|
|
|
|
Hi,
I am having datatable .. i want to add columns to that , i need to add same column once again ... is it possible ???
if it possible pls let me know the right path ...
for i=0 to 10
datatable.column.add("values to be added")
next
note: it throughs excepttion like , column already exist
thanks,
sekannak...
kannak
|
|
|
|
|
sekannak wrote: . i want to add columns to that , i need to add same column once again
I don't think that your idea is good.If you are trying to add same column again you'll get that error.What you are trying to acheive by adding same column again?
|
|
|
|
|
As you have found, column names must be unique. The values you store in the column can be the same of course.
only two letters away from being an asset
|
|
|
|
|
hi
i have created a ASP.NET web application.
I have 3 web forms (.aspx) pages in that.I have 2 hyperlinks in one page.when i click on that link,the repective page should load.I am able to display page from link(without frames),but link disappears(since it's another page).
So can anybody tell me how to create frames,so that page will be displayed in some area and hyperlink will be visible at top?
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
You can use Master & Content page for this functionality.
Keep hyperlinks in MasterPage and add other 2 pages as content page.
|
|
|
|
|
You don't have to do anything special. Just create a page that contains frames, and put your page in one, and your static page in the other.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thank you very much Christian...
could you give a sample link ....(you mean i need to create frames in html page and put target as .aspx page)??
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
www.diawebster.com[^]
That's my company site. The main page is just default.htm, I believe. It goes there automatically, but it's a HTML page. The top aspx uses javascript to control the bottom frame ( they are named for this purpose ). Any links in the bottom section just work, they all work within the frame they are in.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi
I have a repeater control and a textbox in itemtemplate of repeater control. Now I am creating multiple textbox dynamically and bind to the repeater . so i m getting multiple textbox in repeater at runtime.
I need to set the focus on pressing on space bar key on these textbox. actully my requirement is that every textbox accept only one word.
Pls suggest me.
Regards
Vikas
sdsds
|
|
|
|
|
You need to write some javascript to enforce both of these rules.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi
Please send any helpful link for these.
Please suggest me.
Regards
Vikas
sdsds
|
|
|
|
|
Member 2925225 wrote: ctully my requirement is that every textbox accept only one word.
SRY
If It Helps Click It as Answer
|
|
|
|
|
No
this is not the solution.
One word menas it can accept multiple characters.
when I press space bar in textbox, focus set to another textbox .
I have resolve this if textboxes are outside the Repeater control.
But If textboxes are Inside repeater control and are generating at runtime.
how i get the id of the textboxes created at runtime ?
and how it set the focus in textboxes in space bar key press?
Thanks
vikas
sdsds
|
|
|
|
|
Member 2925225 wrote: how i get the id of the textboxes created at runtime ?
ClientID property
Member 2925225 wrote: and how it set the focus in textboxes in space bar key press?
you can catch events in javascript and call the focus() method of a control you look up with document.getElementById
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi
Please send any help ful link to resolve this.
Thanks
Vikas
sdsds
|
|
|
|
|
Sorry Chris, I might be asking similar type question earlier also but this is final summary.
Suppose we have designed a master page. Say we keep nothing in it.
We inherit it in a webform.
Now I have observed the following. Please confirm,reply also:
1. <form> /<form> is not present.
HTML Reset button works fine.
Document.getelementbyid-> does not work because form is not present.
2. In web form where i have inherited master page, I keep one html reset button and standard asp text box.
If autopostback of textbox=true then
whatever we enter in textbox and click on reset, page load occurs.It will retain the values. Now value from text box will not be cleared after clicking on Reset. Because reset sets it back to inital value (that we got after page load).
If autopostback of textbox=false then
whatever we enter in textbox and click on reset, value will be cleared.
3. In my requirement i have inherited master page in web form as mentioned above.
It's requirement to keep autopost back of textbox=True.
Now reset will never clear the values of text box.
In that case, if i use simple HTM button (not reset) and try to write the following code, it does not work because <form> is not present. So document will not be identified.
function ResetForm(){
var elems = document.forms[0].elements;
for(var i=0;i<elems.length;i++){
elems[i].value = "";
}
}
So in webform (using master page), how to clear the values of text box on clicking of button.
Note: document will not work because <form> is not present.
autopost back will be true for text box because we have to trigger event TextBox1_TextChanged1 also.
TextBox1_TextChanged1 will not work without autopostback.
So plz tell me solution.
|
|
|
|
|
amittinku wrote: <form> /<form> is not present.
your page is broken if this is true
amittinku wrote: If autopostback of textbox=true then
whatever we enter in textbox and click on reset, page load occurs.It will retain the values. Now value from text box will not be cleared after clicking on Reset. Because reset sets it back to inital value (that we got after page load).
If autopostback of textbox=false then
whatever we enter in textbox and click on reset, value will be cleared.
Because you don't have a form
amittinku wrote: In that case, if i use simple HTM button (not reset) and try to write the following code, it does not work because <form> is not present. So document will not be identified.
Correct
amittinku wrote: So in webform (using master page), how to clear the values of text box on clicking of button.
PUT A FORM ON THE PAGE !!!!
And don't post a new question when your old one is still visible, and you're asking the same thing.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
PUT A FORM ON THE PAGE !!!!
I have inherited master page. Now I will have to paste controls on Content.
Can we still post a form, there is so speciic control as such
|
|
|
|
|
Your master page defines the form, if it's written right. The content pages go inside the form. An ASP.NET page should only have one form on it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
In Asp .net set the Text Box property EnableViewState="false" then ur prob are solve.........
|
|
|
|
|
Hi To,
I Want to count visitor no of our site and also display it in my site by which user can see his visitor no of site.
for which I have written this code in globle asax in application start event and show it in the master page.
but the value is reset every time.
The code is ..
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Application("visitor") = 1
End Sub
and the code of session_start is..
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Application("visitor") = CType(Application("visitor"), Integer) + 1
End Sub
and
display it in the form load int master page
Me.Label1.Text = "Visitor No " + Application("visitor").ToString()
|
|
|
|