|
Ok,
But I have to display image beside each radio button. Is it possible using Radiobutton list. please see the follwoing code.
HtmlInputRadioButton rdb = new HtmlInputRadioButton();
System.Web.UI.WebControls.Image imgasp = new System.Web.UI.WebControls.Image();
for (int i = 0; i < dvForDisplay.Count; i++)
{
rdb.ID = dvForDisplay[i]["RadioButtonId"].ToString();
rdb.Value = dvForDisplay[i]["PaymentGateway"].ToString();
panelInternational.Controls.Add(rdb);
panelInternational.Controls.Add(imgasp); // adding Image beside each radiio button
}
Thanks
|
|
|
|
|
Can you tell me how to validate on client side? If I click radio button have to call javascript function.
Thanks,
|
|
|
|
|
Im not sure if it is possible, maybe it is, just try it for yourself. After all, a radiobuttonlist is just a grouo of radiobuttons
If you use radiobuttonlist you can then add a single validator to this control and validate (on client side) that the users selects one
Alexei Rodriguez
|
|
|
|
|
I have a DetailsView where there is a DateTime field in an InsertItemTemplate. Im using a popup type calendar located in another aspx page. When a date is selected, the value populates a TextBox in the Parent window.
It works fine with any TextBox - but not the TextBox in the DetailsView. The error generates from the javascript function that tries to Return the Date to the TextBox in the DetailsView. Here's the code:
<br />
function ReturnDate()<br />
{<br />
window.opener.document.forms["<%= strFormName %>"].elements["<%= strCtrlName %>"].value = <br />
"<%= strSelectedDate %>";<br />
window.close();<br />
}<br />
The error is: window.opener.document.forms.form1.elements.txtStartDate is null or not an object.
Obviously its not recognizing the TextBox because it is in the DetailsView.
Anybody knows how to access the TextBox in the DetailsView from JavaScript?
|
|
|
|
|
The problem must be that the name you are using is not the same when the control is rendered on the page, since it is inside a detailsview
Have you tried the control's clientID??
<%= TextboxCtrl.ClientID %>
ClientID will return the complete name of the control
Alexei Rodriguez
modified on Friday, April 25, 2008 1:03 AM
|
|
|
|
|
I saw your other reply, DONT MAKE ANOTHER POST
Or was it an App Error here at codeproject?
Anyways
I didnt really understand what you said on that post, please clarify
Just to see if it works
0- Run your page and switch the detailsview to insert mode
1- Rightclick the page > select view source
2- Find the textbox control name in the html source
3- Copy the whole name and replace strCtrlName in you javascript function with that name
Alexei Rodriguez
|
|
|
|
|
Hi ALexei,
Yeah - I saw the viewsource is using a name like: DetailsViewID$TextBoxID.
I used id, and it works fine.
Thanks so much.
Ekjon
|
|
|
|
|
Maybe you should delete the other post
It makes no sense at all being there alone
Alexei Rodriguez
|
|
|
|
|
Hello to all!
I am passing a session variable (bookID) from Page 1 to Page 2 and I have it displaying as a label on Page 2. However, I am needing to display a gridview2 on the second page for books that have Book Reviews based on that bookID (the one i passed from Page 1 to Page 2). If I need to explain any further please ask I don't mind.
**Books**
bookID
bookName
**Book Review**
bookID
bookReview
bookReviewUser
I would like the gridview2 on page two, to have a column displaying book reviews just for that particular bookID (that was chosen on the gridview1 on page one..after the user clicks on the button in the gridview). Help is very much appreciated!! Thanks!
|
|
|
|
|
Sure, why not.
Whether you are using a SqlDataSource, or DataReader or DataSet - use your bookID in the SQL statement, make this SQL the SelectCommand for your data source, associate the GridView with the data source, bind the data.
Thats it!
Hope it helps.
Ekjon
|
|
|
|
|
On the page2, get the book id from session and query database for getting the reviews and bind the result to the gridview. What is the problem you are facing here ?
|
|
|
|
|
Yes you can use session value
But why dont you use querystrings instead??
Alexei Rodriguez
|
|
|
|
|
How would I go about doing that? Thanks!
|
|
|
|
|
You either need to buy a book or use Google. That is a very basic question.
|
|
|
|
|
Well to put it that way I'd rather use a stored procedure. And no i don't need to buy a book. Read the entire question do u have any suggestions?
|
|
|
|
|
Help,
Something happened and IIS has decided that it can no longer process ASP.NET pages. Instead, it just sends the text of the aspx page to the browser. This is on XP Pro SP2 running a solution built in Visual Studio 2005. The virtual directory in question has its .NET version set to the 2.0 framework. How do I fix this?
Will
|
|
|
|
|
aspnet_regiis -i
from the appropriate framework director (command prompt)
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Cool. Thank you. That fixed all but one of them. And that one is probably installed improperly.
|
|
|
|
|
Hi guys,
I try to use Cache to store email's content which is used frequently throughout whole Web application,
The email was designed to put into a htm file, everytime when the application send email the system will read from the htm file, so the Cache is going to reduce some of IO overhead.
Cache("LINKASCHOOLEMAIL") = "emaill content"
But the problem is if I want to change the content of the email, the changes won't be reflected to cache until I reboot IIS (I can't do in this way because there are several Web applications in that IIS).
So is it any ways to resolve my problem?
Many thanks
Ming
|
|
|
|
|
What happens if you just write:
cache ("key") = "New email content"
Why would you need to restart iis?
Alexei Rodriguez
|
|
|
|
|
because only when IIS is restarted, the cache can be emptied. The reason I want to renew the cache is I want the changes on email being able to be reflect to cache.
'Save email to cache<br />
If Cache("LINKASCHOOLEMAIL") Is Nothing Then<br />
Cache("LINKASCHOOLEMAIL") = "Read email from file"<br />
End If<br />
Many thanks
|
|
|
|
|
I just found that the cache can be emptied if any changes happened on Web.config
|
|
|
|
|
I think im missing something
I dont get it
Why cant you just change the value of a cache element??
Doesnt 1.1 have this method?
Cache.Remove("Key")
Alexei Rodriguez
|
|
|
|
|
Thanks Alexei,
Image that when I tried to deploy another version of application, which the email content(physical file) used by application has been updated, but the code still reads old value from cache instend of the new email file because cache("key") is not Nothing.
Ming
|
|
|
|
|
Im not sure if you can use this in 1.1
Take a look at CacheDependency
Add you email file as a cachedependency
Ass soon as you change that file, the cache item will be removed from the cache
Alexei Rodriguez
|
|
|
|