|
BalasubramanianK wrote: Is there any option in design level itself? Pls help. tnx in adv.
You can use Container.ItmeIndex in DatGrid
<asp:templatefield headertext="Sr.No" xmlns:asp="#unknown"><br />
<itemtemplate><br />
<%#Container.ItemIndex + 1 %><br />
</itemtemplate><br />
</asp:templatefield>
Regard
Khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Tnx. It is working fine.
Balasubramanian K.
|
|
|
|
|
I am using paging in my data grid. Serial number is re started in every page. Actually, I am expecting it should be continuied....
Balasubramanian K.
|
|
|
|
|
use following
]]>
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
rahul.net11 wrote: use following
]]>
DataItemIndex is not supported in DataGrid.It is ItemIndex
please don't forget to vote on the post that helped you.
|
|
|
|
|
No...i am getting..it is not a member of data grid....
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: I am using paging in my data grid. Serial number is re started in every page. Actually, I am expecting it should be continuied....
try this tell me what result get you
<br />
<![CDATA[<%#Container.ItemIndex + 1 + DataGridID.CurrentPageIndex*DataGridID.PageSize %>]]>
please don't forget to vote on the post that helped you.
|
|
|
|
|
No...Mr.Imran
Previously, serial number was come. But now it is also not coming.
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: No...Mr.Imran
Previously, serial number was come. But now it is also not coming.
It is perfectly working in my case
<![CDATA[<%#Container.ItemIndex+1 + DataGridID.CurrentPageIndex*DataGridID.PageSize %>]]>
Have you set your DataGridID
or
Post your code
please don't forget to vote on the post that helped you.
|
|
|
|
|
Yah I have given Grid Id also
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: Yah I have given Grid Id also
Can you post your code?
please don't forget to vote on the post that helped you.
|
|
|
|
|
<asp:datagrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 24px" runat="server"
AllowPaging="True" AutoGenerateColumns="False" CellPadding="3" BackColor="White" BorderWidth="1px"
BorderStyle="None" BorderColor="#CCCCCC" CssClass="GrdRows">
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedItemStyle>
<ItemStyle ForeColor="#000066"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#006699"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
<Columns>
<asp:BoundColumn DataField="srno" HeaderText="No"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Sr No.">
<ItemTemplate>
<![CDATA[<#Container.ItemIndex + 1 + DataGrid1.CurrentPageIndex*DataGrid1.PageSize %>]]>
</ItemTemplate>
</asp:TemplateColumn>
etc................
Balasubramanian K.
|
|
|
|
|
I have installed NUnit-2.4.7-net-1.1 in my system and trying to add the Nunit.Extensions.Asp and Nunit.Extensions.Asp.Tester to my namespace and reference in solution explorer(dll's not found under reference->.net tab) but unable to do it Can anyone figure it out and explain in detail.
Thanks in Advance!
|
|
|
|
|
Are you using VS .net 2003?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
no iam using VS .net 2005....
|
|
|
|
|
Then why you are
using NUnit-2.4.7-net-1.1, I think it is for .Net1.1
There is
NUnit-2.4.7-net-2.0, Available
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
I am trying to generate an ASP.NET Unit Test following step given in MSDN site, So i created a new website added a class file in the solution explorer,A Microsoft Visual Studio dialog box is displayed to ask about placing the new class in the App_Code folder and i clicked yes because it is said that one cannot generate tests from code in an .aspx file or in a folder other than the App_Code folder.
Then it is said Right-click the class in the class file, and then click Create Unit Tests.But when i right click nothing happens
for ref:http://msdn.microsoft.com/en-au/library/ms182526(vs.80).aspx[^]
modified on Wednesday, July 16, 2008 6:55 AM
|
|
|
|
|
I think that namespaces are coming with NUnitAsp[^]
Not with NUnit.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
The real problem :
I am trying to generate an ASP.NET Unit Test following step given in MSDN site, So i created a new website added a class file in the solution explorer,A Microsoft Visual Studio dialog box is displayed to ask about placing the new class in the App_Code folder and i clicked yes because it is said that one cannot generate tests from code in an .aspx file or in a folder other than the App_Code folder.
Then it is said Right-click the class in the class file, and then click Create Unit Tests.But when i right click nothing happens
for ref:http://msdn.microsoft.com/en-au/library/ms182526(vs.80).aspx[^]
modified on Thursday, July 17, 2008 7:09 AM
|
|
|
|
|
Hi,
In most of my forms, I have to show the data based upon the selection. Like Based upon the Drop down list selected value, I have to show the corresponding fields, Based upon radio button selection show remaining fileds...
I am thinking of Javascript to show/hide remaining fields based upon selections. What are the best options for these type of conditions? Is the Javascript is good? I have so many conditions like this.
Thanks in advance
|
|
|
|
|
Yeah, JS is good, but less reliable as it can be turned off at the users end. If same type of functionality is used in many places, I'd create a custom control which does the show/hide and will add options to configure the selection.
|
|
|
|
|
actually i have two file upload control at first page .
and i want to upload two image. at one button click .for this i have write a coda:
string filepath = "C:\\Uploads";
HttpFileCollection uploadedFiles = Request.Files;
for (int i = 0; i < uploadedFiles.Count; i++)
{
HttpPostedFile userPostedFile = uploadedFiles[i];
userPostedFile.SaveAs(filepath + "\\" +
System.IO.Path.GetFileName(userPostedFile.FileName));
}
but now i want to retrive the images at page third .so tell me .
what should i do.
thanks in advance .
gaurav
|
|
|
|
|
if
gaurav mangal wrote: userPostedFile.SaveAs(filepath + "\\" +
Saves the file to a given location on server,
Use a session to store the file path,
Session("FilePath")=userPostedFile.FileName
Then you can retrieve the file path from any page in your application.
ie String strFPath=Session("FilePath")
Now you know the file path, Then what is the problem of getting the file.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Thanks Sherin
Thanks a lot for your great suggestion .
after some modification its really works.
thanks......gaurav
|
|
|
|
|
hi sherin
actually i want to submit two picture at page 1 and want to show the picture at page 3 .
as per your code i am able to see the url at page 1 for two picture.but at third page only last image path show.
so plz tell me how i can see the picture at page third.
should i use any collection for that.
thanks....
|
|
|
|