|
i have a public function defined in the .vb class (this class file is lying in the App_Code folder).How should i access that public function , if I want to use the same , in any source file of the web page.
Suppose i want to convert the date format , of the column in the gridview . The date format function is declared public , and lying in the vb file under the App_Code folder.How should i access that function
<EditItemTemplate><br />
<asp:TextBox ID="txtindate" runat="server" Text='<%#Format(DataBinder.Eval(Container.DataItem,"indate").ToString())%>'></asp:TextBox> <br />
</EditItemTemplate>
The format function is in the vb file under the App_Code folder
|
|
|
|
|
You need to use the fully qualified namespace to get to the function. Is the function static? If not, you won't be able to access it like this at all.
|
|
|
|
|
|
Hello experts
i would like to know how to delete a row from a dataGrid (which is in edit mode), i am using paging and the built in edit, update, cancel methods.
I have been looking all over the posts most seem to be using databases and since i am using a XML file as my surce of data i am abit lost.
heres what i have in my delete event Handler..
private void dgStudents_DeleteCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
int rowToDelete = e.Item.ItemIndex;
dsStudents.student.Rows[rowToDelete].Delete();
//refresh datagrid control to show changes
BindData();
}
the rowToDelete int will get the row to delete, but when i run this and click on delete, i get a runtime error of "There is no Row at position 0"
Help please??
Cheers
Cheers
|
|
|
|
|
hustler2005 wrote: dsStudents.student.Rows[rowToDelete].Delete();
I guess when page is posted back, you will loose this value. Have you checked the count of rows before issuing delete ?
|
|
|
|
|
Hi.
I created a web services but I cant find it in my application. Its in the local host, and i dont see the web services wen i try to add web reference.
why?
thanks.
|
|
|
|
|
Hello everybody,
I have a gridview where a textbox column is present.I have another column which contain a javascript calender. My gridview is dynamically generated. I want to assign the textbox value through the calender.
|
|
|
|
|
Please do not post multiple times -
Clickty[^]
|
|
|
|
|
I have created a asp.net project in my PC i.e offline.My Project is in wwwroot>NGO folder.NGO is my virtual directory.Now i want to put this project on server for making it online.I tried putting it on server,.html files are visible but .aspx files are not loading,it shows page not found error.Plz help me,thank you.
coolsatty
|
|
|
|
|
You need to ensure that all the necessary files are copied across, web.config, bin directory etc.
Check IIS to ensure the correct version of ASP.NET is installed and configured correctly.
|
|
|
|
|
All files r copied properly.And the server is handled by some third party.I can only access it through ftp.I am uploading my project through ftp.Rest of the site under this server is working properly.Thank you.
coolsatty
|
|
|
|
|
Contact your third party and ensure the space that you bought to host your website has IIS and framework support
Sathy
|
|
|
|
|
e.Row.Cells(0).Attributes.Add("onclick", "return GetIndexVal(" & e.Row.RowIndex & ")")using this iam getting the index value on click on the grid view now i want to handle another javascript function on grid view double click how could be possible
|
|
|
|
|
|
Hi,
I am trying to write in file then this exception was occured
the code is as
LogFilePath has file path
FileStream _Stream = new FileStream(LogFilePath, FileMode.Append);
TextWriterTraceListener _TraceListener = new TextWriterTraceListener(_Stream);
Trace.Listeners.Add(_TraceListener);
_TraceListener.WriteLine(message);
_TraceListener.Flush();
Trace.Flush();
_Stream.Close();
please reply if any one solution for this.
thnx
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
Hello everybody,
I have a gridview where a textbox column is present.I have another column which contain a javascript calender. My gridview is dynamically generated. I want to assign the textbox value through the calender.
My gridview code is as below
<asp:gridview id="GrdSubs" runat="server" bordercolor="Transparent" cellpadding="4">
CellSpacing="2" CssClass="text" ForeColor="#333333" GridLines="None" PageSize="4"
Width="600px" OnRowDataBound="GrdSubs_RowDataBound">
<footerstyle backcolor="#990000" font-bold="True" forecolor="White">
<rowstyle backcolor="#C9C9C7" bordercolor="#FF8000" borderwidth="3px" cssclass="grid_data">
ForeColor="#333333" />
<selectedrowstyle backcolor="#FFCC66" font-bold="True" forecolor="Navy">
<pagerstyle backcolor="#FFCC66" forecolor="#333333" horizontalalign="Center">
<headerstyle backcolor="#990000" cssclass="grid_header" font-bold="True" forecolor="White">
<alternatingrowstyle backcolor="WhiteSmoke" cssclass="grid_data">
<editrowstyle bordercolor="#80FF80" borderstyle="Solid" borderwidth="2px">
<columns>
<asp:templatefield headertext="Select">
<headertemplate>
runat="server" type="checkbox" />
<itemtemplate>
<asp:checkbox id="chkSelect" runat="server">
<asp:templatefield headerstyle-horizontalalign="Center">
<headertemplate>Start Date
<itemtemplate>
<asp:textbox id="sdate" runat="server" text="">]]>'>
if (!document.layers)
{
document.write("<img src="cal1.gif" onclick="popUpCalendar(GrdSubs__ctl2_sdate, Form1.GrdSubs__ctl2_chkSelect, \"dd/mm/yyyy\")" height="17" width="18"> ")
}
</img>
<asp:templatefield headerstyle-horizontalalign="Center">
<headertemplate>End Date
<itemtemplate>
<asp:textbox id="edate" runat="server">
if (!document.layers)
{
document.write("<img src="cal1.gif" onclick="popUpCalendar(this, Form1.edate, \"dd/mm/yyyy\")" height="17" width="18"> ")
}
</img>
Plz help me out
A key to every Solution
|
|
|
|
|
When a textbox column of a GridView is written out to the browser, the Id's of the text boxes are generated automatically by ASP.NET. The solution to your problem is letting the javascript calendar know the id of the textbox sitting next to it, in the same row of the grid.
You can do this in the RowDataBound event of the GridView which is fired as the data for each row of the GridView is bound.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
}
} Once you access the TextBox you can assign the onclick event to it with the appropriate client side textbox Id.
myTextBox.Attributes["onclick"] = "popUpCalendar(this, " + myTextBox.ClientId + ", \"dd/mm/yyyy\")";
Use the ClientId property on the server side to get the id of the textbox which will be written to the browser for that particular row. By examining the source of the web page you will see that the onclick for each row will have the correct id for the associated textbox.
|
|
|
|
|
Hi,
I using OWC10(Office Web Component). In that iam creating a Bar chart, Pie chart etc.
Its showing in the Browser perfectly.
I want to convert the chart to pdf.
In the final step i have a byte array.
byte[] byteArr = (byte[])oChartSpace.GetPicture("png", 350, 350);
is it possible to send bytearray to convert pdf. Thanks
Thanks & Regards
Kumaran
|
|
|
|
|
i am doing network print spooler project i want to view the printer queue in asp.net website using c# can any one help me its urgent
|
|
|
|
|
if we keep gridview in loop to check for the values is the speed of the application get it slow
|
|
|
|
|
It depends on how many rows you have in the grid view.
|
|
|
|
|
hi sir how ru... in grid view iam having nearly 130 rows....if it becomes slow mean s how i can check sir
|
|
|
|
|
jagadeeshkumar2106 wrote: in grid view iam having nearly 130 rows
I don't think looping 130 rows will be a performance overhead. What are you doing by looping ? Performance depends on many other factors.
|
|
|
|
|
sir actually iam having two columns in the grid view one is hidden and the other one is visible now i have to compare the values with the hidden and present values and if they are differ i have to make the row color to be changed
|
|
|
|
|
Hi,
can some body tell me How to clear browser history pages programmatically from ASP.Net web page
|
|
|
|