|
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
|
|
|
|
|
|
HI!
Dear i have three textbox (textbox1,textbox2,textbox3) and three button (button1, button2, button3) on my web page now i want when i type some text in textbox1 and press enter then button1 press and when i type some text in textbox2 and press enter then button2 press without clicking by the Cursor on button Please help me...
|
|
|
|
|
ASP.NET will show weird results when pressing enter key. In classical ASP programming this can be achieved by putting different forms for controls. But by generally ASP.NET won't support multiple server forms. So you need to go with some javascript. I have documented this problem clearly here[^]. You can use the class library provided with the article.
|
|
|
|
|
Can install .net 2005 and sql server 2005 in my vista home basic platform
sarith
|
|
|
|
|
Hi friends
I want to convert HTML content to PDF file
Is it possible?
Thanks in advance
Pathan
---------------------------------------------------
|
|
|
|
|
No predefined libraries available. You will get some third party libraries. Check in sourceforge.
|
|
|
|
|
Can I export gridview data?
---------------------------------------------------
|
|
|
|
|
Hi plz see the following code:
I am getting error as "Value cannot be null. Parameter name: dataSet" at the place i have mentioned with bold letters...,
For Each Maingrd As DataGridItem In dgrdmain.Items
Dim chk As CheckBox = CType(Maingrd.FindControl("chk"), CheckBox)
If chk.Checked = True Then 'checked true
Dim eid As Integer = Maingrd.Cells(1).Text
Dim sdloan As Double
Dim sdinstall As Integer
If Val(Maingrd.Cells(29).Text) <> 0 Then
mySqlDataAdapter = New SqlDataAdapter("Select top 1 * from tblsalarydetails where empid='" & _
eid & "' and (datepart(yyyy,edate) < '" & Val(ddlYears.SelectedItem.Value) & "' or (datepart(yyyy,edate) = '" & _
Val(ddlYears.SelectedItem.Value) & "' and datepart(mm,edate) <= '" & Val(ddlMonth.SelectedItem.Value) & "')) order by edate desc", sqlconn)
mySqlDataAdapter.Fill(myDataSet, "tblSalaryDetails")
If (myDataSet.Tables("tblSalaryDetails").Rows.Count) > 0 Then
If TypeOf (myDataSet.Tables(0).Rows(0)(27)) Is DBNull Then
sdloan = 0
Else
sdloan = Val(myDataSet.Tables(0).Rows(0)(27))
sdloan = sdloan + Val(Maingrd.Cells(29).Text)
End If
If TypeOf (myDataSet.Tables(0).Rows(0)(30)) Is DBNull Then
sdinstall = 0
Else
sdinstall = Val(myDataSet.Tables(0).Rows(0)(30))
sdinstall = sdinstall + 1
End If
End If
sqlCmd = New SqlCommand("update tblsalarydetails set loan='" & sdloan & "',Installment='" & _
sdinstall & "' from (Select top 1 * from tblsalarydetails where empid='" & _
eid & "' and (datepart(yyyy,edate) < '" & Val(ddlYears.SelectedItem.Value) & "' or (datepart(yyyy,edate) = '" & _
Val(ddlYears.SelectedItem.Value) & "' and datepart(mm,edate) <= '" & _
Val(ddlMonth.SelectedItem.Value) & "')) order by edate desc) as th where dbo." & _
"tblsalarydetails.edate = th.edate and dbo.tblsalarydetails.empid=th.empid", sqlconn)
sqlCmd.Connection.Open()
sqlCmd.ExecuteNonQuery()
sqlCmd.Connection.Close()
sqlCmd.Dispose()
sqlCmd = New SqlCommand("delete tblmonthsalary where projectid='" & _
Val(ddproject.SelectedItem.Value) & "' and eid='" & eid & "' and Smonth = '" & _
Val(ddlMonth.SelectedItem.Value) & "' and syear='" & Val(ddlYears.SelectedItem.Value) & "'", sqlconn)
sqlCmd.Connection.Open()
sqlCmd.ExecuteNonQuery()
sqlCmd.Connection.Close()
sqlCmd.Dispose()
mySqlDataAdapter.Dispose()
Else
exit sub
End If
End If 'Checked end
Next
Regards,
Magi
|
|
|
|
|
U cannot fill the dataset with null value of dataadapter.
the problem is with retrieving top value.
mySqlDataAdapter = New SqlDataAdapter("Select top 1 * from tblsalarydetails where empid='" & _
eid & "' and (datepart(yyyy,edate) < '" & Val(ddlYears.SelectedItem.Value) & "' or (datepart(yyyy,edate) = '" & _
Val(ddlYears.SelectedItem.Value) & "' and datepart(mm,edate) <= '" & Val(ddlMonth.SelectedItem.Value) & "')) order by edate desc", sqlconn)
mySqlDataAdapter canot be null
Sarith...
|
|
|
|
|
Hi i have checked that query...,
It's contained value...,
But i am getting that error...,
Thast y i given my full code on there...,
Regards,
Magi
|
|
|
|
|
Hi all,
Can we change the position of controls in clientside.
consider in an example.
In panel1 their is textbox firstname
panel2 their is textbox lastname next to this thier is a button btnup
if user clicks button btnup then
The panel2 i.e textbox lastname has to move to position of panel1(top) and panel1 has to come below panel2..
lastname has to come first and firstname has to come below..
thanks in advance
santosh
|
|
|
|