title: passing parameters to .aspx page using renderpartial
body: <p>in my index.aspx page i want to render another module.aspx page using renderpartial
   which then render a .htm file 
  depanding on which parameter is passed from index.aspx  (it would be number ie 1,2 etc ,so as to call different different .htm file everytime depending on the parameter)</p>
  
  <p>1).
  now i want Index.aspx page to render module.aspx and pass it a parameter(1,2,3,etc)
  [the parameters would be passed programatically (hardcoded)]
  and
  2).
  mudule.aspx should catch the parameter and depending on it will call .htm file</p>
  
  <p>my index.aspx has</p>
  
  <pre><code>  &lt;% ViewData["TemplateId"] = 1; %&gt;
    &lt;% Html.RenderPartial("/Views/Templates/MyModule.aspx", ViewData["TemplateId"]); %&gt;
  </code></pre>
  
  <p>and module.aspx contains</p>
  
  <pre><code> &lt;%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %&gt;
  &lt;script type="text/javascript" src="/Scripts/jquery-1.3.2.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/Scripts/Service.js"&gt;&lt;/script&gt; 
  
  &lt;script type="text/javascript"&gt;
  
  
          debugger;
          var tid = '&lt;%=ViewData["TemplateId"] %&gt;';
  
          $.get("/Templates/Select/" + tid, function(result) {
              $("#datashow").html(result);
          });
  
  
  
  &lt;/script&gt;
  
  &lt;div id="datashow"&gt;&lt;/div&gt; 
  </code></pre>
  
  <p>this is my controller which is called by $.get(....) (see code)</p>
  
  <pre><code>public ActionResult Select(int id)
      {
          return File("/Views/Templates/HTML_Temp" +id.ToString()+".htm" , "text/html");
  
      }
  </code></pre>
  
  <p>and finally
  my .htm file</p>
  
  <pre><code>&lt;div  id="divdata" class="sys-template"&gt;
  &lt;p&gt;Event Title:&lt;input  id="title"  size="150" type="text" 
          style="background-color:yellow;font-size:25px;width: 637px;"  
          readonly="readonly" value="{{title}}" /&gt;
      &lt;/p&gt;   
  
  
  &lt;p&gt;Event Description:&lt;input type="text" id="description" value="{{ description }}"  
      readonly="readonly" style="width: 312px" /&gt;&lt;/p&gt;
  
  &lt;p&gt;Event Date: &lt;input type="text" id="date" value="{{ date }}" readonly="readonly" 
          style="width: 251px"/&gt;&lt;/p&gt;
  &lt;p&gt;Keywords : &lt;input type="text" id="keywords" value="{{keywords}}" readonly="readonly" /&gt;&lt;/p&gt;
     &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      Sys.Application.add_init(appInit);
      function appInit() {
          start();
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>start() is javascript  method which is in file Service.js</p>
  
  <p>when i run this programm it gives me error
  js runtime error: 'object expected'
  and debugger highlighted on</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/**xhtml**1-strict.dtd"&gt;
  </code></pre>
  
  <p>pls help me solve the problem</p>