|
i solved .
this is the solution.
Take buttonfield set text ="Deactivate"
in gridview indexchanged event write like this
gridviewrow row = gridview1.selectedrow;
row.enabled = false;
ROWCOMMAND EVENT
if(e.commandname.tostring()="deactivate")
{
for(int icounter =0;icounter<gridview1.rows.count;icounter++)>
{
gridviewrow row = gridview1.selectedrow;
row.enabled = false;
}
}
|
|
|
|
|
I am doing an application, which has almost completed. Now i want to implement this in our Intranet site. I have configured IIS Virtual Directory.
When i am calling this from my PC it is working fine.
Example : -
http://localhost:56/pms/login.aspx
But i am not able to get this page from other machines in our network.
I have set the properties also....but no use
What could be the issue..?
Please help....?
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Localhost means you can access it on your computer only, is the app currently being held on your computer?
|
|
|
|
|
I presume you are replacing "localhost" with the machine name when calling it from another computer on the network...?
Make sure you have configured the computer's firewall to allow HTTP connections through - at least from your Intranet.
|
|
|
|
|
I have gone through with a thorough check of http scope. Its all seems to be fine. When i am calling the application from other machine like
http:
it is not showing any page...?
Please help me fixing this...
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
try entering the above url on your own machine
you tried localhost which worked didnt it on your own machine?
Where is the web app stored?
|
|
|
|
|
You need not specify port no:
http://localhost:56/pms/login.aspx
remove this part- :56
http:://localhost/pms/login.aspx
try above one.
-->be sure u need to have virtual directory with name pms
-->u need to take windows authentication of your system when u trying to access this website into another system.
This is haneef.............................................................
|
|
|
|
|
i wrote a text in label.
lbl.text = "1- aaaaaaa. 2-bbbbbb"
i want show it in 2 line, this form:
1- aaaaaaa.
2-bbbbbb.
how can i do this.? how use from \n
|
|
|
|
|
|
Try "1- aaaaaa. \r\n2-bbbbbbb"
|
|
|
|
|
Hi Everyone,
I doing some research on binding a .txt file content to a datagrid, i already try some function and feature e.g. Readline. But i still can't manage to populate my .txt file content in order. Pls give some advice, if i din't explain my question clearly pls inform me.
Thanks in advance,
Mouse regards.
|
|
|
|
|
Have you tried to read the data in the text file, into a DataSet?
Once you have your data in a DataSet you could just bind it to a DataGrid.
|
|
|
|
|
Hi Bardy85,
Thanks for your reply, i have do some research after saw your msg. But after i do some net searching, it seems hard to find the code for binding the .txt file to dataset. You mind to provide me a few line of code about how to bind the .txt file to dataset, i appreciate your reply. Thank You.
Millions of Thanks,
Mouse Regards.
|
|
|
|
|
Sure thing.
http://www.codeproject.com/KB/aspnet/Read_Text_File.aspx
This should help. Its shows how to create a DataTable, add fields from a text file then bind it to a gridview.
Hope this helps.
If you run into anyother problems just shout.
|
|
|
|
|
Hi Bardy85,
Thank for your reply again, your link is very helpful to me actually, but i doing my project in ASP.net in VB language, i understand the logic of the article in the link that you provided to me, and i also try to convert it to VB language, but bcoz of lack of programming skill i seems fail to convert it. Any other link that in VB language can provide to me? or showing me some line of code also can. Thanks in advance.
Million of Thanks,
Mouse Regards.
|
|
|
|
|
Hallo
Can someone please help me I am stuck I have been trying to find a solution but with now luck. My problem is as followes I am taking parts of a program that was written in VB6 over to ASP.net I have done most of it but I am now stuck at with the following. In the program you can attache different types of files from txt to CSV to excel and.... Those files are ziped and then placed in a directory after upload. I now need to unzip the files and display them. I am out of ideas every thing I have tried to display them leads me nowhere. I have tried ReportView, WebClient and File but I am just not getting any luck. I haven't even tried to do the Unzip yet. I am pretty new at this so any help will be appriciated.
Kind Regards
Monica
|
|
|
|
|
I think it would be best to Zip the files yourself, then upload them to the server thats hosting your site. Display then on a page which will then allow you to then download the files. You would have to unzip them yourself though.
|
|
|
|
|
Thank you very much for your reply but I don't know how to display the unziped file in a web browser, that is where my problem is. The files I need to display are different extentions from tif to excel files and I have no idea how to display them.
|
|
|
|
|
inside a form
1)i have a report viewer inside a div tag,which has an id,
2)a button for print
when the button is pressed a script works as given below
function printPartOfPage(elementId)
{
var printContent = document.getElementById(elementId);
var windowUrl = 'about:blank';
var uniqueName = new Date();
var windowName = 'Print' + uniqueName.getTime();
var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=750,height=800');
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
alert(printWindow);
printWindow.print();
printWindow.close();
}
when it executes a new window gets opened in which the report viewer becomes visible
MY PROBLEM IS
While taking the printout of the values in this report viewer,the values are not printed out as output.Please help me.
|
|
|
|
|
Hi All,
I have a paging enabled datagrid, and am using a button to show/hide the editable columns (Template fields).
Lets say the user has navigated to second page, now I want to enable only the rows of the second page on click of edit button (which is outside of grid) instead of making all the rows editable.
NOTE: I cannot use Edit/Update Template fields in datagrid.
Any help is greatly appreciated.
Sean
|
|
|
|
|
You could try something like this.
foreach (GridViewRow Row in GridView)
{
if (Row.RowType == DataControlRowType.DataRow)
{
((TextBox)Row.FindControl("txtBoxMakeEnable")).Enabled = true;
}
}
Hope this helps.
|
|
|
|
|
Hi guys i have posted this one already,
But i didnt get exact o/p.
So once again i am posting here,
Actually in one link button click i have to add 3 textbox in my form...,
After enter in that textbox if my enduser need to fill one more set of records,
if he click that link button again, it have to add again 3 more textbox like this i need...........,
Finally when he click submit button the datas have to store into my database...,
Some guys said to use gridview...,
Suppose if i go for gridview in footer if i tell three textbox in template columns...,
In page load there is no values in my grid...,
So it wont show the footer template column...,
So i cant go for gridview also now,
Give me some ideas to solve this...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
You can still show a gridview if it is empty.
http://www.google.com/search?hl=en&client=opera&rls=en&hs=hiy&q=show+empty+gridview&btnG=Search
There quite a few examples here, for how to show a gridview when there no data.
|
|
|
|
|
For adding textboxes dynamicaly into a form you can either add textbox controls to a form directly or to a placeholder control inside the form.For retriving values correctly i suggest you to place controls inside a placeholder.
You want to create 3 Textboxes in each link button click.Here what i had done is I placed a dropdownlist with items 1,2,3 ..etc.According to the selected item value of the dropdownlist that much set of 3 Textboxes is generated.
For that first I place a DropDownList1,PlaceHolder1 and Button1 in the form.
My code follows
protected void Page_Load(object sender, EventArgs e)
{
for (int i = 0; i < Convert.ToInt16(DropDownList1.SelectedItem.Text); i++)
{
PlaceHolder p2 = new PlaceHolder();
p2.ID = "p2" + i;
PlaceHolder1.Controls.Add(p2);
for (int j = 0; j < 3; j++)
{
TextBox tb = new TextBox();
tb.ID = "TextBoxg"+i + j;
p2.Controls.Add(tb);
RequiredFieldValidator f1 = new RequiredFieldValidator();
f1.ControlToValidate = "TextBoxg" + i+j; ;
f1.ErrorMessage ="*";
p2.Controls.Add(f1);
p2.Controls.Add(InsertBreaks(1));
}
p2.Controls.Add(InsertLineBreaks(2));
}
}
private static Label InsertBreaks(int breaks)
{
Label lblBreak = new Label();
for (int i = 0; i < breaks; i++)
{
lblBreak.Text += " ";
}
return lblBreak;
}
private static Label InsertLineBreaks(int breaks)
{
Label lblLineBreak = new Label();
for (int i = 0; i < breaks; i++)
{
lblLineBreak.Text += " ";
}
return lblLineBreak;
}
protected void Button1_Click(object sender, EventArgs e)
{
string[] data = new string[3];
foreach (Control c in PlaceHolder1.Controls)
{
int yu = 0;
foreach (Control c23 in c.Controls)
{
if (c23.GetType().ToString().Equals("System.Web.UI.WebControls.TextBox"))
{
data[yu] = ((TextBox)c23).Text;
yu = yu + 1;
}
}
//data[0], data[1], data[2] will contain the datas of each row.
//Here you can give your insert command to the database
}
}
}
Explanation:Here inside PalceHolder1 I dynamically created a placeholder with 3 Text Boxes for each row.According to the selected value of the dropdownlist, number of placeholders are dynamically created inside PlaceHolder1.For each TextBoxes I dynamically created required field validators also.If you dont want validator you can remove it and use.
Hope this code will clear your doubts
|
|
|
|
|
i want create templatefield in gridview
i wrote this code:
RadioButton rb = new RadioButton();
TemplateField select = new TemplateField();
select.ItemTemplate = (ITemplate)rb.TemplateControl;
select.HeaderText = "SELECT";
timeGrid.Columns.Add(select);
but dont show any radiobutton in each row. how should i do???? plz.
|
|
|
|