| |

VerySource

 Forgot password?
 Register
Search
View: 650|Reply: 4

anxious! !! !! !! !! Please master help!

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-2-6 15:30:02
| Show all posts |Read mode
A website in Chinese and English,
I use a single page for the news. I have a title picture on the list page and the detailed page.
What I originally thought was that the header image was loaded through skinid dynamic +
But it can't be realized now, others say that because I use it in a custom control, it doesn't work.
I took the picture and put it on a template page, but it still didn't work.

 protected void Page_PreInit (object sender, EventArgs e)
    {
        //Choose a language
        string lang = null;
        if (Session ["lang"] == null || Session ["lang"]. ToString () == "")
        {
            lang = "0";
            this.Theme = emailclass.StyleSheetTheme.selectlang (lang);

        }
        else
        {
            lang = Session ["lang"]. ToString ();
            this.Theme = emailclass.StyleSheetTheme.selectlang (lang);

        }

        switch (Request.QueryString ["newstyp"]) // Select the picture to display according to the news type parameter
        {
            case "01": // 01 Industry Focus
                Image1.SkinID = "info_ifocus";
                break;
            case "02": // 02 News
                Image1.SkinID = "info_inews";
                break;
            case "03": // 03 Media Advertising
                Image1.SkinID = "info_imedia";
                break;
            case "04": // 04 Product Promotion
                Image1.SkinID = "info_iporducy";
                break;
            ...
        }
    }


    
    protected void Page_Load (object sender, EventArgs e)
    {
        ...
    }

The above is the code part.
I wonder, what is the problem?
Very anxious, please master help!
Reply

Use magic Report

0

Threads

31

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-3-28 14:15:01
| Show all posts
Page_PreInit
Before initialization? Was there a problem with this incident? You changed it here, will it revert to the default value during initialization? You put it in PAGE——LOAD, or other events after initialization
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-3-29 22:30:01
| Show all posts
It seems there is no problem with this event because a template page is used
Reply

Use magic Report

0

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-8-11 13:00:01
| Show all posts
When did I teach you to put these codes in the Page_PreInit event???
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-8-20 10:15:01
| Show all posts
The results are:

Theme, does not support dynamic addition

I had to write another class, the address of the picture used inside, no skinid

Thank you all for your help!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list