|
What do you want to do with this index value? Do you want to use it to pick up the selected data row in the dataset? If so, you simply persist the id value using the DataKeyNames[^] property, and you can access the selected id from the DataKeys collection.
|
|
|
|
|
I am using calendar in my project. At Page_Load i make the calendar visible=false and it become visible with a button click but when it become visible i can not pick any date. Does anyone knows how to solve this problem?
|
|
|
|
|
Do you mean that when the calendar becomes visible you can see it on the web page but you cannot select any date or the control gives you nothing at the server side? Could you be more specific with code snippets?
|
|
|
|
|
Hello,
I have a need after every 8 rows in a Repeater I make a <TR> visible.
Is this even possible? If so, how would I go about it.
Thank so much for the help.
RB
|
|
|
|
|
Where do you define the tr element? I guess that you may use the ItemCreated/ItemDataBound events to count the RepeaterItem, then you can make the tr visible/invisible in the way you want.
|
|
|
|
|
Hello,
I try to register a gif to my asp page.
I have an img tag that contains an image and by pressing a button I want to change the image.
Actually I have here two questions:
1 - How do I register the image so I can change it using the JavaScript?
2 - How do I refer to the Image using the JavaScript?
Thanks a lot,
Yossi
|
|
|
|
|
You can use the getElementById[^] method to get reference to img element, then change the Src[^] property.
|
|
|
|
|
Hi to all. Sorry, my english is bad.
I have a problem. Let I have file X:\a.dat, where X - network device. Function in my web-service check existence of this file:
<br />
FileInfo fileInfo = new FileInfo(@"X:\a.dat");<br />
if (fileInfo.Exists)<br />
.................<br />
This code returns false, but it really exists. Then access denied. I set username="Administrator of local machine" password="His password" in web.config's <processmodel> section. But problem didn't solve. But if I check \\servername\sharename\a.dat then it is work.
Please, help me.
|
|
|
|
|
Basically when the process identity does not have the permission to access the file, the Exists method returns false even the file is existing. The KB below can give you a hint:
Process and request identity in ASP.NET[^]
|
|
|
|
|
I set userName="SYSTEM" password="AutoGenerate" in machine.config's <processmodel> section. But when I check existence X:\a.dat - result false,
when \\servername\sharename\a.dat - result true.
|
|
|
|
|
|
Hello all,
in my ASP.NET 2.0 home page. i put DropDownList for selection of a theme. once selection of a theme i am storing in a Session object. but while navigating twice to another page i am lossing the Session value.
here i am i am applying theme dynamically in page_PreInit event by
this.Theme = "Theme1";
how to solve the problem?
regards
GV Ramana
|
|
|
|
|
Then you have to investigate if you are losing the entire session, or if it's only the session variable that changes.
Write out the Session.SessionID somewhere, so that you can see if it changes. If it does, then you have lost the session. If not, then you have some error in your code that causes the session variable to change.
---
b { font-weight: normal; }
|
|
|
|
|
Hello everyone,
I have a datagrid in with there is a linkbutton that uses the ItemCommand. When this is clicked, I would like to open a new window and pass the page in the new window the datakeyfield value of the row in which the button was clicked. I've done similar things before with just a link button by itself, along the lines of:
<br />
lnkButton.Attributes("onClick") = "window.open('mypage.aspx?RowID=" & intRowID & ")"<br />
But I'm having a hard time figuring out how to adapt that to work from within a datagrid. Any pointers would be greatly appreciated. Thanks in advance!
-------------------
abort, retry, fail?
|
|
|
|
|
In the datagrid onRowDatabound event, you can use code like the following to find the linkbutton in that row, and then your code above should work the same:
<br />
<br />
Dim btnLink as LinkButton<br />
<br />
btnLink = CType(e.Item.FindControl("lnkId"), LinkButton)<br />
<br />
'Your code here<br />
<br />
|
|
|
|
|
D'oh, that makes sense!
Thanks!
-------------------
abort, retry, fail?
|
|
|
|
|
Hi,
I have developed a asp.net 2.0 website and it is ready to be tested by the testers.
I know that the machine which will be used for testing will need to have .net 2.0 framework as well as internet expoler.
Then how do I copy the necessary files (i.e. .aspx, ...) and where do these files should go to (i.e. where on the hard disk drive)?
Thanks
|
|
|
|
|
Usually you can copy your entire application folder to C:\Inetpub\wwwroot on the test machine. You will need IIS installed on the target machine and you may have to register it as an application in IIS, though.
-------------------
abort, retry, fail?
|
|
|
|
|
Hai,
Anyone of u, have worked with Radtabstrip control, Radmultipleview and pageview1 control than plz. tell how to implement it.
nikki
|
|
|
|
|
Hi all
Plz can any one tell me this
I have Table which contains details of an employee The table have an unique ID's
Now i want take all the id's and i want to put it an array
can any one give me syntax for this
How to put the result in array
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
ArrayList ids = new ArrayList();<br />
foreach (DataRow DR in dataTable.Rows)<br />
{<br />
ids.Add(DR["ID"].ToString());<br />
}
and use ids arraylist where you want to use.
Nav.
|
|
|
|
|
HI
THX for reply
I am getting this error can u plz solove this
I converted to VB.NET
CODE
--------
Dim ids As ArrayList = New ArrayList
For Each DR As DataRow In dsCustomers.Tables(0).Rows(0).Item("productid")
ids.Add(DR("productid").ToString)
Next
But it is saying " Specified cast is not valid"
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
I am not prof in vb, but it seems, you are going to deep in
kirthikirthi wrote: dsCustomers.Tables(0).Rows(0).Item("productid")
you need just somethink like this:
dsCustomers.Tables(0).Rows
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Thx I got it
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hi,
I'm using C# 2.0 and ASP.NET. I have an panel control on my page. I have dynamically created asp:textboxes. But now everything in beneath each other. All my styles have been defined. How do I dynamically add <br /> tages, or a <div> tag? I usually use <div class="VerticalSpacer10"></div> between 2 textboxes for spacing purposes. How do I add this beneath each textbox?
Regards.
ma se
|
|
|
|