|
function validate()
{
if (document.getElementById("<%=yourDropdownList.ClientID%>").value=="")
{
alert("The Music Name cannot be blank");
document.getElementById("<%=yourDropdownList.ClientID%>").focus();
return false;
}
return true;
}
place the code in to the javascript section in client
and onclientclick event of button call the function as OnclientClick="return validate()"
|
|
|
|
|
hello friends
I am developing a website in which on a button click i am calculating distance and driving time between two places using Javascript something like this
http://maps.live.com/default.aspx?wip=2&v=2&style=r&rtp=~&&msnurl=DirectionsFind.aspx?%26redirect%3dfalse&msnculture=en-US[^]
So in my website i am showing a Table in which a div tag is their to which i am assigning TEXT website is getting struck at that point something like
Tabel1 is visible , Button is clicked , On click dist & time are cal and assigned then Table 2 is visible and Table 1 is hide
so website is getting struck at the Table1
Please tell me how to solve this problem
Thank You
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
This question belongs in another forum
We are not a Code Charity
|
|
|
|
|
.netman wrote: This question belongs in another forum
This Question belongs to another forum
Can u tell me which forum .
Cooking ?
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Krazy Programmer wrote: Cooking
huh, was that a joke or are you stupid?
In a javascript forum maybe, but I might be wrong...
We are not a Code Charity
|
|
|
|
|
.netman wrote: huh, was that a joke or are you stupid?
it was a joke and you are stupid
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Krazy Programmer wrote: you are stupid
Im not the one asking a javascript question in a asp.net forum
We are not a Code Charity
|
|
|
|
|
.netman wrote: one asking a javascript question in a asp.net forum
because there is no such javascript forum thats why i asked it in asp.net
any way if u know answer reply ...dont comment
Happy programming
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Krazy Programmer wrote: because there is no such javascript forum
http://www.google.co.uk/search?hl=en&q=javascript+forum&btnG=Google+Search&meta=
hmm....
We are not a Code Charity
|
|
|
|
|
i mean to say in code project
We all know what you are ..
No need to make your self clear
Stop commenting . stop replying to every post with a useless answer if possible leave code project
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Hi
I have been asked to replicate the custom role manager tool in my website.
I have currently got a page where a user can register their details using the CreateUserWizard but Im not sure how to allocate roles through my website.
is there a custom tool like the CreateUserWizard but for roles which i can use?
thanks
We are not a Code Charity
|
|
|
|
|
I want to put a control on a web page to separated a series of steps that the user performs, from the rest of the page. I wanna make it look somehow like the wizard but I think if I used the wizard control, it'll be complicated because I wanna insert Gridviews and I wanna maintain users input and also the some steps maybe skipped based on user's input.
So I was thinking if I can insert a webpage inside the current webpage that is completely separate from the main web page. I don't want a pop up menu. I want to add something like a componenet iside the main web page and perform all these steps inside this component without navigating from the main page. Is there anyway I can do this without the wizard control.
Also, If the wizard control is the only way to do that..can someone send me a link on how to handle Gridviews inside a wizard control an mainatain user's input data through the wizard's steps..I counldn't find any references on the web?
Thanks
can I use a web part for that?
modified on Friday, June 13, 2008 6:15 AM
|
|
|
|
|
Dear all,
My task is to get the students name and rollno from the database depending upon the course and year and also to bind subject names in the top row with different columns subjects names like
Rollno Studentname English Botany Zoology Chemistry
1 s txtbox
2 f txtbox
Submit
Like the above condition i want to enter marks for students.
Can any one of u pls guide me which is the way to do the above process
Hope the best answer will come
Thanks and Regards
sai krishna
|
|
|
|
|
Start with the first part of your question which is staright forward.
You want to display data from a database in a gridview or table?
Use a simple article on the web to leanr how to display data from a datbase, it would be easier then me explaining it to you
We are not a Code Charity
|
|
|
|
|
Hi,
I need to use a Dropdownlist in the PagerTemplate of the gridview. The dropdownlist contains
all the page numbers. When I select a different page number from the dropdownlist, the grid must move to
the selected page. My gridview looks like this:
<pre> <asp:gridview id="grdProds">
runat="server"
Width="100%"
EmptyDataText="No product(s) found."
PageSize="5"
AllowPaging="true"
PagerSettings-NextPageText="Next"
PagerSettings-PreviousPageText="Previous"
PagerSettings-Mode="NextPrevious"
PagerSettings-Position="Bottom"
PagerStyle-CssClass="HyperLinkStyle1"
CssClass="Grid"
ShowHeader="False"
BorderStyle="None"
GridLines="None"
ShowFooter="true"
AutoGenerateColumns="False"
OnPageIndexChanging="grdProds_PageIndexChanging" OnDataBound="grdProds_DataBound" OnRowDataBound="grdProds_RowDataBound" >
<columns>
<asp:templatefield>
<itemtemplate>
<asp:hyperlink id="hLink" runat="server" navigateurl=""><![CDATA[<%# Eval("Category_Id", "~/Products.aspx?CatID={0}") %>]]>'
Text='<%# Eval("Product_Name") %>' CssClass="HyperLinkStyle1"></asp:hyperlink>
<br />
<asp:label id="lblDesc" text=""><![CDATA[<%# Eval("Product_Short_Description") %>]]>' runat="server" CssClass="SCTextLarge" />
<br />
<br />
<span id="spPrice" runat="server">
<b>Price:</b>
<asp:label>
ID="lblPrice"
runat="server"
Text='<%# Eval("Product_Price","{0:C2}") %>'
CssClass="SCText"
/>
<br />
<b>Qty:</b>
<asp:textbox>
id="txtQty"
runat="server"
MaxLength="4"
Width="15%"
Text="1"
/>
<asp:comparevalidator>
ID="comQty"
runat="server"
ControlToValidate="txtQty"
Type="Integer"
Operator="dataTypeCheck"
ErrorMessage="*"
SetFocusOnError="true"
/>
<asp:requiredfieldvalidator>
ID="reqQty"
runat="server"
ControlToValidate="txtQty"
ErrorMessage="*"
SetFocusOnError="true"
/>
<asp:button>
id="btnAddToCart"
runat="server"
Text="Add"
CommandName="Add"
CommandArgument='<%# Eval("Product_ID")%>'
OnCommand="OnCommand"
CssClass="SearchButtonStyle"
/>
</asp:button></asp:requiredfieldvalidator></asp:comparevalidator></asp:textbox></asp:label></span>
</asp:label></itemtemplate>
<itemstyle cssclass="GridItem" />
</asp:templatefield>
<asp:templatefield>
<itemtemplate>
<a href=""><![CDATA[<%# SetUrl(Eval("Category_Id"),Eval("Product_Id")) %>]]>' >
<asp:image id="img" runat="server" imageurl=""><![CDATA[<%# GetImageUrl(Eval("product_image_tn_path")) %>]]>' AlternateText="Image not available" />
</asp:image></a>
</itemtemplate>
<itemstyle cssclass="GridImage" />
</asp:templatefield>
</columns>
<pagertemplate>
<table width="100%">
<tr>
<td style="width:70%;">
<center>
<asp:button>
ID="btnPrev"
runat="server"
CommandName="Page"
CommandArgument="Prev"
OnCommand="OnCommand"
CssClass="PagerButton"
Text="Previous"
/>
<asp:dropdownlist>
id="drpPager"
runat="server"
AutoPostBack="true"
OnSelectedIndexChanged="drpPager_SelectedIndexChanged"
Width="10%"
/>
<asp:button>
ID="btnNext"
runat="server"
CommandName="Page"
CommandArgument="Next"
OnCommand="OnCommand"
CssClass="PagerButton"
Text="Next"
onmouseover="this.style.font-weight='bold';"
/>
</asp:button></asp:dropdownlist></asp:button></center>
</td>
<td style="width:30%;">
<asp:label>
id="lblProdsView"
runat="server"
CssClass="PagerText"
/>
</asp:label></td>
</tr>
</table>
</pagertemplate>
<pagersettings mode="NextPrevious" nextpagetext="Next" previouspagetext="Previous" />
<pagerstyle cssclass="HyperLinkStyle1" />
</asp:gridview></pre>
I am setting the grid to the newly selected page in the selectedIndexChanged event of the dropdownlist.
Now when I choose a different page from the drop downlist, the page posts back but the drop downlists SelectedIndexChange event does
not fire.
Can anybody tell me the reason and/or work around. My Intention is to use dropdownlist in the
Pager. If anybody has any other code, please send it to me.
Regards,
Wasif.
|
|
|
|
|
Hi all,
i have a list box and i items are shown from the Ms-Access database.Now i need context menus for adding ,deleting updating the database after right clicking on the this list box items...
pls help me...
thanks in advance..
manikkuttan
|
|
|
|
|
lets start from the top:
You have a listbox containing data from a database
You want a user to be able to click on an item in the listbox and edit it or delete
You also want to give the user the ability to add items to a database.
This is fairly straight forward stuff involving learning to connect to database.
Check this article out for a start:
http://www.aspfree.com/c/a/Microsoft-Access/Connecting-to-a-Microsoft-Access-database-with-ASPNET/
We are not a Code Charity
|
|
|
|
|
Hi,
my aim is not only database manipulation but also and most importantly to adding context menu for list box item on right click
regards,
Manikkuttan
|
|
|
|
|
on button click i open a new pop up window.when i am in that pop up window there will no action takeplace in the master page where i open the pop up window unless i close the popup window.
|
|
|
|
|
deepthy.p.m wrote: there will no action takeplace in the master page
What does that mean?
We are not a Code Charity
|
|
|
|
|
while being in the pop up window, i don't want any action to take place in the master page, unless i have closed the pop up window and returned back to master page. How to do that?
|
|
|
|
|
Ah so you want to disable the masterpage whilst in the pop-up, hmm...
You either have two options here;
1. You dont include the masterpage at all within your pop-up window
2. You write some code to disable all the functions in the code behind masterpage
comprenday?
We are not a Code Charity
|
|
|
|
|
how abt Going for a Ajax Control ?
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
How would ajax control help?
We are not a Code Charity
|
|
|
|
|
Isn't this just a rewrite of your question in the VB forum?
[^]
I suspect nobody really know what you are trying to achieve? A modal form in ASP.NET?
Bob
Ashfield Consultants Ltd
|
|
|
|