"An object reference is required for the non-static field, method, or property'System.Web.UI.Page.ClientScript.get'"
This is what I did:
checked with GetManifestResourceNames(), 'swfER.Resources.Maze.swf' was listed
in assemblyinfo.cs, I entered:
[assembly: WebResource("swfER.Resources.Maze.swf", "application/x-shockwave-flash")]
in WebBrowserForm
Expand|Select|Wrap|Line Numbers
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace swfER
- {
- public partial class WBForm : Form
- {
- public WBForm()
- {
- HtmlTextWriter writer = null;
- InitializeComponent();
- Render(writer);
- }
- private void Render(HtmlTextWriter writer)
- {
- String template =
- @"<html><head></head><body><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
- codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'
- width='400' height='320'>
- <param name='movie' value='{0}'>
- <embed src='temp.swf' width='400' height='320'
- pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'
- type='application/x-shockwave-flash'></embed></object></body></html>";
- writer.Write(string.Format(template,
- Page.ClientScript.GetWebResourceUrl(this.GetType() ,
- "swfER.Resources.Maze.swf")));
- }
- }
- }
Please, inform me what to do to make this work, if you can. Really appreciate it. Thank's in advance.