|
<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
|
|
|
|
|
Hi Gaurav,
One thing just noticed was that Session["file"] (Ill refer it in the code as Session["files"] since its more understanding I think ) as it actually has a collection and not a single file.
So lets do it like this...
Before writing the files to the page we need to traverse through the list.ie:
if(Session["files"] != null)
{
List<string> myFilesCol = (List<string> )Session["files"];
foreach(string sFileName in myFilesCol )
{
Responce.Write(sFileName);
}
}
Apart from accessing the list, another thing I noticed was that, when you are using the file upload control, I doubt whether you could get the client file path, but I believe you are refereing the the uploaded file name collection...
Hope its clear.
Thx,
Gayani
|
|
|
|
|
Hi,
How do i calculate the Start_cell_number and end_cell_number from Start_Display_datetime and end_display_datetime calcultion.
here is my code .
TimeSpan timeSpan1 = TimeSpan.Parse("8:00");//5:00 AM Start_dispaly_dateitme
TimeSpan timeSpan2 = TimeSpan.Parse("9:00");// 9:00 AM end_display_datetime
TimeSpan timeSpanDiff = timeSpan2.Subtract(timeSpan1);//hours difference
int mins = timeSpanDiff.Hours * 60 + timeSpanDiff.Minutes;//total minutes
int cells = mins / 15;//count number of cells
Now how i calculate the Start_cell_number and end_cell _number ?
first cell contains name of machines and from second cell i have to calculate .
Any hint is highly apperciated.
Best regards
Rameez
|
|
|
|
|
Hi ,
iam facing difficulty in arranging data from database to table control or
Gridview like this
in first cell of table i want to display Vehicle name and from second table cell i want to display reservations against name of vehicle like this
iam getting Data into dataset .
Channel T1 T2 T3
C1 P1 NA P3
C2 NA P2 NA
Any help or hint?
Best regards
Rameez
|
|
|
|
|
Populate dataset and from there bind your dataset to gridview.i don't know if this will help
Gridview .datasource = dsvihicle
gridview.databind()
Mamphekgo
|
|
|
|
|
hi
m trying to store and retrieve image in sql database.
m having a problem in retrieving it....
all the bytes are not retrieved only first 13 bytes are retrieved..
can anybody help me with his... how can i retrieve all bytes from sql table..????
|
|
|
|
|
Member 3486231 wrote: all the bytes are not retrieved only first 13 bytes are retrieved..
Do you think the, problem is with visual studio or sqlserver?
What is the data type in sqlserver?
Can you show some code?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
hi everybody i have looked evrywhere but cant find the solution for this....
i want to display word document stored in sql database and i want to show
that document in browser....please help of point me in right direction
thanks in advance...
appu
|
|
|
|