need help to pass runtime values to a custom user control
-
Hi all, I created a custom user contols which accepts some parameters and fetches records to a datagrid and display it. The problem is: Now i need to pass a dynamic variable say I need to pass it like this; But this doesn't work and it says invalid syntax near "<". I replaced this with < still I couldn't get the solution "<%=dData%>" :: for this it says incorrect syntax near "<" Please help... Thanks in advance,
-
Hi all, I created a custom user contols which accepts some parameters and fetches records to a datagrid and display it. The problem is: Now i need to pass a dynamic variable say I need to pass it like this; But this doesn't work and it says invalid syntax near "<". I replaced this with < still I couldn't get the solution "<%=dData%>" :: for this it says incorrect syntax near "<" Please help... Thanks in advance,
-
Can you post your code please ::zimcoder:: Brainbench Certified ASP.NET developer What Democracy?? Jesus Christ is King and if you do not like it... well you can go to hell!
Hi, I'm copying the relevant code since that code is too large to copy here.. in code behind I'm getting that error. codebehind in Web user control (.cs file) extending : WebControl string strSelect = SQLQ.ToString(); DA = new SqlDataAdapter(strSelect,theConnection); DS = new DataSet(); DA.Fill(DS); DGGen.DataSource = DS; DGGen.DataBind(); HTML side ------------------------------------------------------------------------------ <%@ Page language="c#" Codebehind="Category.aspx.cs" AutoEventWireup="false" Inherits="Products.Category" %> <%@ Register TagPrefix="GTS" NameSpace="Products.Controls" Assembly="Products" %> ListCategory
---------------------------------------------- hope this code help u to understand my problem.. here I want to transfer the ID through CgID (as a runtime value), But it is not working sharath
-
Hi, I'm copying the relevant code since that code is too large to copy here.. in code behind I'm getting that error. codebehind in Web user control (.cs file) extending : WebControl string strSelect = SQLQ.ToString(); DA = new SqlDataAdapter(strSelect,theConnection); DS = new DataSet(); DA.Fill(DS); DGGen.DataSource = DS; DGGen.DataBind(); HTML side ------------------------------------------------------------------------------ <%@ Page language="c#" Codebehind="Category.aspx.cs" AutoEventWireup="false" Inherits="Products.Category" %> <%@ Register TagPrefix="GTS" NameSpace="Products.Controls" Assembly="Products" %> ListCategory
---------------------------------------------- hope this code help u to understand my problem.. here I want to transfer the ID through CgID (as a runtime value), But it is not working sharath
this one is missed.. between those TR's techqrys@rediffmail.com wrote: "" ""
-
Can you post your code please ::zimcoder:: Brainbench Certified ASP.NET developer What Democracy?? Jesus Christ is King and if you do not like it... well you can go to hell!
oops.. these tags are getting swallowed.... <GTS:ADMINDATATABLES id="adminDG" SQLQ="slect * from tbl_products where categoryid=<%=CgID%>" runat="server" HLURL="EditLessons.aspx?QryId={0}" UniqId="LessonID" HLText="Edit" Edit="True" RperP="5"></GTS:ADMINDATATABLES>
-
oops.. these tags are getting swallowed.... <GTS:ADMINDATATABLES id="adminDG" SQLQ="slect * from tbl_products where categoryid=<%=CgID%>" runat="server" HLURL="EditLessons.aspx?QryId={0}" UniqId="LessonID" HLText="Edit" Edit="True" RperP="5"></GTS:ADMINDATATABLES>
techqrys@rediffmail.com wrote: SQLQ="slect * from tbl_products where categoryid=<%=CgID%>" it would seem to me that the above query is not correct. you are not properly concatenating "slect * from tbl_products where categoryid= to the dynamic value <%=CgID%> try putting single quotes here '<%=CgID%>' Goodluck zimcoder What Democracy?? Jesus Christ is King and if you do not like it... well you can go to hell!
-
techqrys@rediffmail.com wrote: SQLQ="slect * from tbl_products where categoryid=<%=CgID%>" it would seem to me that the above query is not correct. you are not properly concatenating "slect * from tbl_products where categoryid= to the dynamic value <%=CgID%> try putting single quotes here '<%=CgID%>' Goodluck zimcoder What Democracy?? Jesus Christ is King and if you do not like it... well you can go to hell!
Hi zimcoder, I thank you for all the help u r doing, I tried with <%=CgId%> or <%#CgId%> or <%; Response.Write(CgId); %> with single quote as you said, But that didn't worked for me. and the query I typed here is wrong. But I gave that right in my code. If I take out that tag and hardcode to some value say 1 or 2 it works very fine for me. I'm stuck in here for a long time. Please help. Thank you, Sharath.
-
Hi zimcoder, I thank you for all the help u r doing, I tried with <%=CgId%> or <%#CgId%> or <%; Response.Write(CgId); %> with single quote as you said, But that didn't worked for me. and the query I typed here is wrong. But I gave that right in my code. If I take out that tag and hardcode to some value say 1 or 2 it works very fine for me. I'm stuck in here for a long time. Please help. Thank you, Sharath.