How to create Accordian menu inside the gridview

Hi..

   I am using a gridview it displays some details about members....

But now i need to use Accordian menu inside the gridview's item template.

First the gridview displays the membersname only if i click any one of them,

it should open a particular div and displays other details from database...

So guys,Can u suggest me to do that successfully ?

do you want exactly this type of thing then tell me

http://geoinvesting.com/forums/AllBoard.aspx?BrdType=G

Ok so you want  ...let me try then let you know

Hi,

Nomatter which server control being used, we can create Accordian with proper CSS and jquery like this

$(document).ready(function() {
 
	//ACCORDION BUTTON ACTION
	$('div.accordionButton').click(function() {
		$('div.accordionContent').slideUp('normal');
		$(this).next().slideDown('normal');
	});
 
	//HIDE THE DIVS ON PAGE LOAD
	$("div.accordionContent").hide();
 
});

Please check out this tutorial http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/

ssjGanesh

Sorry i need this type of menu...

so why you not download code from that link....??

WebControl decorated with Designer attribute cannot be resized in Visual Studio 20082010 designer

We have a subclassed WebControl which is decorated with the Designer attribute and displays an image in GetDesignTimeHtml.  It is built using VS 2008 Sp1.  Under VS 2005, when placed in the toolbox, and dragged into an aspx page in design mode, it behaves just fine.  However, in both VS 2008 Sp1 and VS 2010 Sp1, the image cannot be resized in design mode.  I have recreated the problem using the following code:

// WelcomeLabel.cs
using System;
using System.ComponentModel;
using System.Security.Permissions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.Design.WebControls;
using System.ComponentModel.Design;

using System.Collections;
using System.Configuration;
using System.Web.Configuration;
using System.Web.UI.Design;
using System.Text;
using System.Reflection;
using System.Windows.Forms;
using System.Drawing;

namespace Samples.AspNet.CS.Controls
{
    [
    Designer(typeof(WelcomeLabelDesigner)),
    DefaultPropertyAttribute("ID"),
    ToolboxBitmap(typeof(WelcomeLabel), "Samples.AspNet.CS.Controls.WecomeLabel"),
    ToolboxData("<{0}:WelcomeLabel runat=\"server\" Height='256px' Width='256px' > </{0}:WelcomeLabel>")
    ]
    public class WelcomeLabel : WebControl
    {
        [
        Bindable(true),
        Category("Appearance"),
        DefaultValue(""),
        Description("The welcome message text."),
        Localizable(true)
        ]
        public virtual string Text
        {
            get
            {
                string s = (string)ViewState["Text"];
                return (s == null) ? String.Empty : s;
            }
            set
            {
                ViewState["Text"] = value;
            }
        }

        protected override void RenderContents(HtmlTextWriter writer)
        {
            writer.Write("Testing how the App_Code directory works.<br>");
            writer.WriteEncodedText(Text);
            if (Context != null)
            {
                string s = Context.User.Identity.Name;
                if (s != null && s != String.Empty)
                {
                    string[] split = s.Split('\\');
                    int n = split.Length - 1;
                    if (split[n] != String.Empty)
                    {
                        writer.Write(", ");
                        writer.Write(split[n]);
                    }
                }
            }
            writer.Write("!");
        }
    }

    internal class WelcomeLabelDesigner : ControlDesigner
    {
        protected WelcomeLabel parentControl;

        public override void Initialize(IComponent component)
        {
            base.Initialize(component);

            if (component is WelcomeLabel)
            {
                parentControl = (WelcomeLabel)component;
            }
        }
        
        public override string GetDesignTimeHtml()
        {
            try
            {
                StringBuilder sb = new StringBuilder();
                String url = parentControl.Page.ClientScript.GetWebResourceUrl(this.GetType(), "Samples.AspNet.CS.Controls.resources.images.WelcomeLabel.bmp");
                sb.Append("<img alt=\"background image\" src=\"" + url + "\"  height=\"" + parentControl.Height + "px\" width=\"" + parentControl.Width + "px\"/>");
                return sb.ToString();
            } catch (Exception ex)
            {
                // Display the error in VS.net, in Design view
                return String.Concat("<h3>Error</h3>Stack Trace:<br>", ex.StackTrace + "   " + ex.Message + " " + ex.InnerException);
            }
        }
    }
}

[RESOLVED] Launch ClickOnce application from asp.net website

Hi,

I have a ClickOnce application which is published to a IIS virtual directory.  I would like to lauch this ClickOnce application by clicking on a hyperlink from a webpage in an asp.net website.  Please sugget how can I do this.

 

Cris Evan

 

Hi cris,

check this link

you need to give like this

<a href="MainProject.exe">Call MainProject</a>

[RESOLVED] Object reference on HttpContext.Current.Session

Hi,
I've got "Object reference not set to an instance of an object." here.. HELP!? -___-

if (HttpContext.Current.Session["Testing"] == null)
            {
            }

I read alot of articles regarding here but nothing helps..
Please provide code snippet if possible.. 

Thanks,
KURAI 

hi change the condition like this

if (HttpContext.Current.Session!=null&&HttpContext.Current.Session["Testing"] == null)
            {
            }

Is HttpContext.Current object null or HttpContext.Current.Session object?

Those objects are scoped at the thread level... so are you using a separate thread to access HttpContext.Current or .Session?

In which environment this code is called, from the Page, Global.asax, custom HTTP handler/module? or...

On which page you are using HttpContext.Current.Session["Testing"]? aspx or Global page

san SanZ,

It's confirmed that the session is null.. what should I do for this to work?

Here's a code snippet..

if (HttpContext.Current.Session == null || HttpContext.Current.Session["WorldPost"] == null)
            {
                var SKIN = new SKIN();
                HttpContext.Current.Session["WorldPost"] = SKIN.LoadWorldPost(); \\ ERROR HERE
            }

 

Hi,
This is on webservice.... 

Then maybe this answer could help you...

Hi Web services are stateless,

and still want to modify the code look this,

http://stackoverflow.com/questions/7545711/asp-net-c-sharp-httpcontext-current-session-is-null-inside-webservice

san SanZ,

What do you mean by stateless? cannot put session at webservice?

By default, Web Services are stateless. However, that doesn't mean that they cannot maintain state.Although you are often told that a statefull Web Service is a Bad Thing, it doesn't hurt to know that the possibility exists.In this article, Bob Swart shows how to add state management and session support to your web services, explaining what to do and what not to do, so you can decide for yourself if, where and when you want to use this ability

check this one

http://www.drbob42.com/examines/examin47.htm

san SanZ meant that web services don't persist any state between requests from the client, by default...meaning that a web service doesn't know that a client request has made previous requests. But that doesn't mean you can't maintain state on a web service or use session state... look at the links in the posts above. Additional info:

http://msdn.microsoft.com/en-us/library/aa480509.aspx

Hi ALL,
I got this working now... thank you so much...
One last question... (or just need to confirm)..
If user will access my webservice or in process that will access my webservice they will not get the same value since I am now using Session right unlike Cache?

[WebMethod(EnableSession = true)]
        public string GetWorldPost(string skip)
        {

            if (HttpContext.Current.Session == null || HttpContext.Current.Session["WorldPost"] == null)
            {
                var SKIN = new SKIN();
                HttpContext.Current.Session["WorldPost"] = SKIN.LoadWorldPost();
            }
        }

 

yes abolutley i guess

But I need to change the sessionKey to something unique right? userID perhaps..

HttpContext.Current.Session[SESSIONKEY]

 

[RESOLVED] MCTS -Certification

Hi,

 Can anyone give the url for free online practice tests of MCTS - (70-536 and 70-562) papers.

 I am planning to write both papers next month.

you can find lot on the net try Testking they provide some sample questions, but for more you have to pay, if you have VCE file viewer you can download some vce dump from examcollection.com and even Trial VCE opener also..

In www.ExamCollection.com contains so many practice exams. It will definitely useful for you and your MCTS preparation.