|
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....
|
|
|
|
|
Hi Gaurav,
In the code you've given its clear that you are saving the file in 'filepath' location.
That means the files you want in page three will be in the server by the time you want in page three..So...
What I feel is, at the same time save all the file names into a collection and store that in the session.
example:
List<string> myFiles = new List<string>();
myFiles.add(userPostedFile.FileName);
//Add this line after saving the file.
Then add it to a session
Session["MyFileCollectionNames"] = myFiles;
Now go to your third page. And check if this particular session is null or not. If not..
if(Session["MyFileCollectionNames"] != null)
{
List<string> myFiles = (List<string> )Session["MyFileCollectionNames"];
foreach(string sFileName in myFiles
{
// You can retrieve the file name from the variable sFileName here...
//Full file path : filepath + sFileName
}
}
Hope it helps
Thx,
Gayani
|
|
|
|
|
Thanks Gayani
Thanks a lot for your great suggestion .it works code is 100% currect .
but now i have one more prob. for you .plz advice .
actually now i can see the path of the images at page third. but i want to set the path at two image control at the page .how i can do it.because we are using collection how i can retrive images one by one.
thanks ...gaurav
|
|
|
|
|
Hi Gaurav,
Collections such as List<T> could be accessed by using the foreach.
So...here is the code to access each item.
List<string> myFiles = (List<string> )Session["MyFileCollectionNames"];
string sFilePath = //Set your file path here.
foreach(string sFileName in myFiles)
{
Image oImg = new Image();
oImg.ImageUrl = sFilePath + sFileName ;
Page.Controls.Add(oImg);
}
Hope it helps
Thx,
Gayani
|
|
|
|
|
thanks gayani
for this quick response.but i would like to say that when i used this which you have already suggest .then it not give me the right path of the image .
myFiles.Add(userPostedFile.FileName);
Session["file"] = myFiles;
Response.Write(Session["file"]);
and shows these lines .
System.Collections.Generic.List`1[System.String]System.Collections.Generic.List`1[System.String]
suggest me .
gaurav
|
|
|
|