|
Hi ,
I got one solution,but i dont know is it correct or not..Anyway its working..
<br />
<br />
protected void DGShowCount_ItemDataBound(object sender, DataGridItemEventArgs e)<br />
{<br />
if (e.Item.ItemType != ListItemType.Header & e.Item.ItemType != ListItemType.Footer)<br />
{<br />
HyperLink HprWiat = (HyperLink)e.Item.Cells[1].FindControl("HprWiat");<br />
if (e.Item.ItemType == ListItemType.AlternatingItem)<br />
{<br />
HprWiat.CssClass = "Pendinglink";<br />
}<br />
else<br />
{<br />
HprWiat.CssClass = "Pendinglink1";<br />
}<br />
}<br />
}<br />
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Hi,
I was trying to upload a file to my server through my web page but the password prompt pops out. Where can I set the username and password so that it won't prompt my user for password?
Thanks in advance.
J Liang
|
|
|
|
|
On the folder where you upload file.If security issue is not very high i usualy set for user Everyone Full control permission and it's work.
|
|
|
|
|
Hi c#ivan,
Thanks for the reply.
I'd tried setting it to Everyone and give all the permission to Everyone but still it prompt me for password. It's there something I miss in the process?
J Liang
|
|
|
|
|
how to update details view without using sqldatasource and object datasource
|
|
|
|
|
Hi,
I have a gridview which has dropdown list in template column and i am adding value dynamically to that drop down list.Now I want to save all the values which I have selected in the dropdown list. But while clicking on save button in that page it is not retaining the selected values of the ddl.
How can I solve this?
Thanks & Regards
Mishra
|
|
|
|
|
How are you adding the items? Through Javascript? If so, your server-side code knows nothing about the items. When the page is reloaded after a postback the DDL will be reloaded from the server-side. Any items added using client-side code will be lost. You would either need to post back the details for the items added in client-script to your server, or delegate the loading of the DDL to your client-side code.
Paul Marfleet
|
|
|
|
|
Hi,
I am adding values to the ddl in RowDataBound event using the following code.
if (e.Row.RowType == DataControlRowType.DataRow)
{
DropDownList ddlval = new DropDownList();
ddlval = (DropDownList)e.Row.FindControl("ddlvalidation");
if (lblcheck.Text == "Suspect")
{
ddlval.Items.Add("Error");
ddlval.Items.Add("No Error");
}
else if (lblcheck.Text == "Fatal")
{
ddlval.Items.Add("Not Fixed");
ddlval.Items.Add("Fixed");
}
& In the button save I am trying to fetch the selected values using the following code, but I am getting the error "Object reference not set to an instance of an object."
foreach (GridViewRow rec in this.gvsqldesc.Rows)
{
//Response.Write(rec.Cells[0].Text);
DropDownList ddlval = new DropDownList();
ddlval = (DropDownList)rec.FindControl("ddlvalidation");
string str = null;
str = ddlval.SelectedItem.Text;
}
Thanks & Regards
Mishra
|
|
|
|
|
Your button click event fires before the grid databinding has taken place. The controls you had added dynamically have not been recreated yet. You should wait until the grid databinding has taken place before attempting to reference any controls you have created dynamically.
Paul Marfleet
|
|
|
|
|
Hi
I am into a project where i have to prepare a doumentation a project.I have one structure for the documentation, still i feel that there may be better way of documenting so please can any tell the documentation of a project look like.
If so plz help me.
mallika
-- modified at 1:56 Tuesday 9th October, 2007
|
|
|
|
|
I have a treeview to which i am providing a datasourceid as the sitemapdatasource.Now the problem is that suppose i have subdirectory in a directory.I am navigating to other pages through treeview.Suppose if i selected any page from subdirectory.While moving to next page where i want to land it shows me the subdirectory gets collapsed. i want to show it expanded if user selected any item from it.How ????
|
|
|
|
|
hi there,
i have a master page and content page..
how can i use external javascript in a content page?
i have googled the topic but cant seem to find the answer...plizzz help
thanx,
|
|
|
|
|
Add this
in body tag of master page or if you need js function only in one page then add this in <asp:content> tag of content page.
|
|
|
|
|
Oppss...
your right.. i manage to link it with external javascript..
thanx
|
|
|
|
|
I'm using a master page to build my individual pages. If you want post user input from my (asp.net)page to another asp page(is a another asp website which only accepts value get method in form)(Should Open up in new window).
I tried to post the values through the master page form.
This window gets opened up not only for required linkbutton, but also for all the events in the page which is not expected.
//In script block of master page
function Postvalues(link)
{
var CE = document.getElementById('aspnetForm');
CE.action = link;
CE.target = "_blank";
CE.submit();
}
'' Adding attribute to the content page to open the asp window by posting the values using the above javascript.
ctrl_amt.Attributes.Add("onClick", "javascript:Postvalues('www.somelink.asp');")
I would Appreciate your timely help.
Thanks
Mohamed
-- modified at 13:37 Monday 8th October, 2007
|
|
|
|
|
Hello,
I have a lame question about passing a string variable from one aspx.cs file to another aspx.cs file.
In the first page I am retrieving the current server address as so:
psServerAddress = Request.ServerVariables["Server_Name"];
psServerAddress is declared in the second aspx.cs file.
Goal: I want get() and set() methods to retrieve the current server name and then access it in
my second aspx.cs file.
|
|
|
|
|
Don't cross post
only two letters away from being an asset
|
|
|
|
|
Please give me the code for updating data in gridview bound columns.
I need aspx.cs code also
Sunil Nair
|
|
|
|
|
What is gridview datasource?
|
|
|
|
|
|
No one here is just going to give you fully working code. If you have tried to do this and have run into problems, post the problem you ran into and people will try to help; otherwise, try to do the work yourself first.
Also, using a subject of "Pleae help me Urgent" isn't likely to get you responses any faster, and in fact, may prevent you from getting responses at all. Every one answering questions on these forums does so on a volunteer basis and most (almost all) consider it rude to ask questions with subjects like this. Any question to the poster is usually urgent, but using a non-descriptive subject like this generally causes people to ignore the post.
|
|
|
|
|
You really should buy a book and work through it. Or at least read the guide on how to ask sensible questions.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How can i display (without Save/Open dialog) .doc file, stored in sql server 2005 like binary data (column type image), on .aspx page.
|
|
|
|
|
Set the content type to application/msword on the response object.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Yes i did. But i got Save/Open dialog instead to write content on page. I do not need to download .doc file, i need to display them on page.
|
|
|
|