|
am having the problem when retreving data from database.
i hav a value in database "page'3.aspx". single quotes is there.
i retrieve it and displays it in a datagrid as a link.The link displays like page'3.asp but the problem is when im passing dat value as a querystring it
i snot taking dat singlequote
<%# DataBinder.Eval(Container.DataItem,"Art_Nr") %>
|
|
|
|
|
oh ho...
the problem is that,
this code <%# DataBinder.Eval(Container.DataItem,"Art_Nr") %>
will act as a c# code and the output of that code will taken as a string so that in a string if we want to add single quotes we should use escape charecter.
i think u got the problem
-- modified at 6:31 Thursday 9th August, 2007
Sarith...
|
|
|
|
|
Why are Server control tags shown in the browser instead of the controls it represents?
what's the meaning of this question
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Sonia Gupta wrote: Why are Server control tags shown in the browser instead of the controls it represents?
Server controls can't be shown in the browser in any other way than the controls that they render. In what way do you mean that the server control are "shown"? What controls would they "represent"?
Sonia Gupta wrote: what's the meaning of this question
That's what I am wondering too...
---
single minded; short sighted; long gone;
|
|
|
|
|
this question is written in asp.net faq
it's answer is
This is because the server control tags were not converted into their respecting HTML element tags by ASP.Net. This happens when ASP.Net is not properly registered with IIS.
.Net framework provides an Administration utility that manages the installation and uninstallation of multiple versions of ASP.NET on a single machine. You can find the file in C:\WINNT\Microsoft.NET\Framework\v**\aspnet_regiis.exe
use the command: aspnet_regiis.exe -u ---> to uninstall current asp.net version.
use the command: aspnet_regiis.exe -i ---> to install current asp.net version.
I know the aspnet_regiis , but not getting the question
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
I can understand that. The question should rather read:
"Why are the code of the server controls visible in the source of the page in the browser, instead of the html elements that they should render?"
---
single minded; short sighted; long gone;
|
|
|
|
|
Sonia Gupta wrote: Why are Server control tags shown in the browser instead of the controls it represents?
Probably because you didn't put runat="server", then the tag will be passed straight through instead of being parsed on the server side.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i have html textbox control. i want to read it in my code behind file i.e. .cs file. but i will not able to get that control's name in list. please tell me how to read html contols at code behind file.
|
|
|
|
|
You need to add runat="server" in order to see a control on the server side.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
U can only use that control in code behind which has ranAt="Server"
So take id of textbox and runAt="Server" in html code
Best regard
Pathan
---------------------------------------------------
|
|
|
|
|
U can also set the same by right clicking the control and select "Run as Server control"
VanithaVasu
|
|
|
|
|
Hi,
I have created the build for my web application using Apache ANT. I used IsCmdBld.exe for making the build.
But when i browse the webpage from IIS, then i get following error on page:
"The file /ABC/Default.aspx has not been pre-compiled, and cannot be requested."
I have compiled the application using NANT and used aspnet_compiler for doing the same.
How to get rid of this error? Can anyone please guide me?
Thanks,
Deepa
|
|
|
|
|
How can I access the EditCommandColumn in a DataGrid on ItemCreated?
My datagrid is like:
<br />
asp:datagrid id="myDataGrid" runat="server" Width="100%" BorderWidth="0px" CellPadding="0"<br />
AutoGenerateColumns="False" AllowSorting="True"<br />
AllowCustomPaging="True" GridLines="Horizontal" ShowFooter="True" CssClass="grid"><br />
<br />
Columns><br />
asp:EditCommandColumn ButtonType="LinkButton"><br />
<HeaderStyle Width="50px"></HeaderStyle><br />
/asp:EditCommandColumn><br />
/Columns><br />
/asp:datagrid><br />
What I'm looking for looks something like this:
<br />
private void myDataGrid_ItemCreated(object sender, DataGridItemEventArgs e)<br />
{<br />
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) <br />
{<br />
EditCommandColumn myEditCommandColumn = (EditCommandColumn)e.Item.Controls[0];<br />
myEditCommandColumn.UpdateText = "<IMG src='" + My.Themes.ImgPath + "update.gif' border='0' alt='Update'>";<br />
myEditCommandColumn.CancelText = "<IMG src='" + My.Themes.ImgPath + "cancel.gif' border='0' alt='Cancel'>";<br />
}<br />
}<br />
As you see I want to add Images on the different text commands,
but I have problems getting the "EditCommandColumn myEditCommandColumn = (EditCommandColumn)e.Item.Controls[0];".
Thanks
Thomas
|
|
|
|
|
How to upload video clip in asp.net.
|
|
|
|
|
Use file upload control to pick the file and upload it to server.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
<asp:HyperLink ID="name" runat ="server" Text='<%#databinder.eval(container.dataitem,"user_name") %>' NavigateUrl="<%# "default2.aspx?id=" + DataBinder.Eval(Container.DataItem,"Sub_Category_ID")%>"></asp:HyperLink>
there server tag is not well formed.This is the problem.Please sort out
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
try this
<asp:HyperLink ID="name" runat ="server" Text='<%# Eval("user_name") %>' NavigateUrl="default2.aspx?id=<%# EVal("Sub_Category_ID")%>"></asp:HyperLink>
Best regard
Pathan
---------------------------------------------------
|
|
|
|
|
thanks for the reply, i will try this.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Sonia Gupta wrote: NavigateUrl="<%# "default2.aspx?id=" + DataBinder.Eval(Container.DataItem,"Sub_Category_ID")%>"
NavigateUrl = "default2.aspx?id=<%# DataBinder.Eval(Container.DataItem,"Sub_Category_ID")%>"
Try this.
|
|
|
|
|
Dear Friends,
I have a web application,in which I need a paging in Grid view which has to have following output:
First Prev 1 2 3 4 5 Next Last
I have done Paging with the following format-
1 2 3 ... >>
or
<< ... 2 3 4
But can anyone help me ,how to show numeric links,also limited no. of numeric links can be visible(3 ta a time) with string values.
Thanking You
sanjay kumar samantaray
|
|
|
|
|
My suggession is you can add link buttons for first,next,previous and last in the footer and write appropriate codings.
If there is any other option means please tell me also.
VanithaVasu
|
|
|
|
|
i have a master page and content page in content page i have a girdview inside gridview headerRow i have CheckBox and checkbox column when user click header checkbox then allcheck box in the column should check and when header checkbox uncheck then all checkbox in the column should uncheck.
|
|
|
|
|
public void Checkbox_CheckedChanged(object sender,System.EventArgs e)
{
CheckBox chkbx=new CheckBox();
chkbx=(CheckBox)sender;
if(chkbx.Checked==true)
{
foreach(DataGridItem dgi in DataGrid1.Items)
{
((CheckBox)dgi.FindControl("check")).Checked=true;
}
}
else if(chkbx.Checked==false)
{
foreach(DataGridItem dgi in DataGrid1.Items)
{ ((CheckBox)dgi.FindControl("check")).Checked=false;
}
}
}
And The Html Code Should Be
<asp:DataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 136px" runat="server">
<Columns>
<asp:TemplateColumn>
<HeaderTemplate>
<asp:CheckBox Runat="server" AutoPostBack=True Checked="False"
OnCheckedChanged="Checkbox_CheckedChanged"></asp:CheckBox>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID=check Runat="server"></asp:CheckBox> </ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
I think this code helps you.
VanithaVasu
|
|
|
|
|
Hi,
I have downloaded Visual Studio Beta 2, and I need a program to open it up. It has a .img extension. Please can someone advise?
Regards
ma se
|
|
|
|
|