|
look at below link you will get the solution.
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Accordion/Accordion.aspx
Regards
Keyur Satyadev
|
|
|
|
|
Here's a sample that works for me. This is one of my accordian snippets from an Ajax-enabled web project. Take a look - you might see something that you have missed. Also, check your CSS - make sure you don't have bugs in there - something that might be hiding a div for example.
<ajaxToolkit:Accordion ID="ajax_acc_Reports" runat="server"
HeaderCssClass="accordionheader" HeaderSelectedCssClass="accordionheader-selected"
SelectedIndex="-1" AutoSize="None" FadeTransitions="true" TransitionDuration="250"
FramesPerSecond="40" RequireOpenedPane="false" SuppressHeaderPostbacks="true">
<Panes>
<ajaxToolkit:AccordionPane ID="apnAnalysis" runat="server" ContentCssClass="accordionpane-selected">
<Header><strong>Analysis</strong></Header>
<Content>
<ul><li><a href="Reports/Analysis/July_09.pdf" title="QA July 09 Report"
target="_blank">QA July 09 Report</a></li></ul>
</Content>
</ajaxToolkit:AccordionPane>
</Panes>
</ajaxToolkit:Accordion>
Please let me know if this does or does not help you
|
|
|
|
|
Here's my problem: I have a button and when I click it I want to open a new page. I know that I can do this thing very easy by setting the PostBackUrl property of the button. But here's what I want to do: on my page I have a textbox and, for example when I press the button I want to test the text from the TextBox and if it's ok I want to show the new page; if not I want to display a message. I want to do that using c# language, and not JavaScript. I've tried this:
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
if (TextBox1.Text == "something")<br />
Button1.PostBackUrl = "NewPage.aspx";<br />
else<br />
....................<br />
<br />
}<br />
<br />
Ok, everithing is fine until now. But when I press the button, assuming that in my textbox I've written "something", the NewPage isn't displayed. My current page is loaded again and when I press the button again then NewPage.aspx is displayed. And I don't know why this is happening.
Can anyone help me please?
|
|
|
|
|
Try:
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "something")
{
Response.Redirect("NewPage.aspx");
}
else
{
....................
}
}
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"
|
|
|
|
|
I think he wants to "Postback" to a new page and not re-direct to a new page.
|
|
|
|
|
The Postback url defaults to the current page and this is where your first click will return to, because, at this first click point your browser doesn't know to postback to NewPage.aspx. Only on the second click (after you've set Button1.PostBackUrl = "NewPage.aspx") will you get postback to the new page.
IF YOU NEED TO POSTBACK TO A DIFFERENT PAGE THEN....
you can't avoid using javascript. Setting PostBackUrl on the server won't affect the current request (your first click).
IF YOU'RE NOT REALLY CONCERNED WITH POSTBACK THEN....
do what the other guys suggested and replace the Button1.PostBackUrl = "NewPage.aspx" with the ReDirect, or Server.Transfer("NewPage.aspx"); code.
|
|
|
|
|
Here's my problem: I have a button and when I click it I want to open a new page. I know that I can do this thing very easy by setting the PostBackUrl property of the button. But here's what I want to do: on my page I have a textbox and, for example when I press the button I want to test the text from the TextBox and if it's ok I want to show the new page; if not I want to display a message. I want to do that using c# language, and not JavaScript. I've tried this:
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
if (TextBox1.Text == "something")<br />
Button1.PostBackUrl = "NewPage.aspx";<br />
else<br />
....................<br />
<br />
}<br />
<br />
Can anyone help me please?
|
|
|
|
|
if i understand you correctly , when the Textbox value is equal to what you want a use to be transfered to another page else show the message(Error), if so , then you can do it this way
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "something")
{
Response.Redirect("NewPage.aspx",false);
}
else
{
}
}
Hope this is what you are looking for. One more thing , Dont post the same thing twice , its not allowed here.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
I am working on a asp.net application. In this I want a javascript function which have to invoke Anchor tag click event without clicking in asp.net.
If anyone have any idea to do this please reply me.
Thanks in advance.
|
|
|
|
|
|
use
location.href=document.getElementById('myanchor').href;
I think this is what you needed.
|
|
|
|
|
Hi I have a css class
.gridHeader
{
background-image:url('images/hdr.gif');
}
now I have set the "HeaderStyle-CssClass" property of Gridview to "gridHeader".
In design view the header image comes properly.But when I browse the page in browser the header image disappears.
CC26
|
|
|
|
|
Its may be due to the browser..!
Delete history cache and all the files in the browser and try again..!
If you still have the problem let me know..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
I tested with various browsers....IE,Mozila,Chrome
but the result is the same
CC26
|
|
|
|
|
Hi,
almost every browser has a developer tool. Use it to track the images, css and stuff like that.
|
|
|
|
|
where is your css file..!
If it is in the root ..!then it should work
if it is in the folder lets say its in
App_Themes/Theme1/StyleSheet.css
then You have to give
background-image:url(../../images/button4.gif);
depending on the folder..!
one../ should be used..!
if you still has the problem as petr suggests open it in browser and view page source..! and check the image
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
THE CSS file is in the root only.
The browser page source for gridview header row is given below.it seems ok only.
<table cellspacing="0" cellpadding="4" rules="cols" border="1" id="ctl00_ContentPlaceHolder1_grdSoData" style="color:#333333;font-family:Times New Roman,Arial;font-size:Small;border-collapse:collapse;">
<b><tr class="gridHeader"></b> <th scope="col"><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$grdSoData','Sort$COLUMN1')" style="color:#333333;">COLUMN1</a></th>
<th scope="col"><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$grdSoData','Sort$COLUMN2')" style="color:#333333;">COLUMN1</a></th>
<tr>
I have cleared the browser cache also.But nothing worked.
CC26
|
|
|
|
|
I tried just now its working good..!
First for me also didnt waork i deleted all the cache objects and it worked now..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
THE CSS file is in the root only.
The browser page source for gridview header row is given below.it seems ok only.
<table cellspacing="0" cellpadding="4" rules="cols" border="1" id="ctl00_ContentPlaceHolder1_grdSoData" style="color:#333333;font-family:Times New Roman,Arial;font-size:Small;border-collapse:collapse;">
<b><tr class="gridHeader"></b> <th scope="col"><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$grdSoData','Sort$COLUMN1')" style="color:#333333;">COLUMN1</a></th>
<th scope="col"><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$grdSoData','Sort$COLUMN2')" style="color:#333333;">COLUMN1</a></th>
<tr>
I have cleared the browser cache also.But nothing worked.
CC26
|
|
|
|
|
|
Hi All,
According to our requirement we are showing highslide when we click on button,this button which is a control of a datalist.we are getting the highslide with the necessary information when we click on the button.
But the thing is when we click on "prev"/"Go back" button of the browser which we can see in all browsers.
It is again loading the highslide,where we are calling the function in the Button "showhighslide".
I dont know what might be the problem?
Can any one help me?
Thankyou In Advance.
|
|
|
|
|
I didnt use High slide ..!
But If u want for picture views ..?
I saw a beautiful control or js for picture presentation i.e. LightBox..!
If Interested click the below link..!
http://www.huddletogether.com/projects/lightbox2/[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hi,
I am using asp.net multiview control in one of my forms.Here the prob is - some controls in each view contains dot net validation controls.They are getting fired when I navigate throw the multiview. Please provide the solution for this.
Thanks,
Srinivas Mateti
9440071311
|
|
|
|
|
Make it as a single group
by keeping ValidationGroup name=same for the validators and buttons..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Using whatever control you are navigating through the MultiView...just set the following property of that control
CausesValidation=false
CC26
|
|
|
|