Hello - I hope someone can help me with this. I have ajax modal popup extender, and when the popup will be open I want the surrounding of the window to be with black background. Can someone help me with that? Thx, Laziale
laziale
Posts
-
ajax popup extender black background around the window -
Programmatically Update SqlDataSourcewhy don't you create a sql stored procedure, send the parameters and update the table which you want to be updated. It's really easy to update a field programatically. Check this link for more info regarding stored procedure and this link for playing with stored procedures in asp.net hope that can help, Laziale
-
using eval and databind in html part of fileHello guys - can someone point me to some proper article where I can learn how to use databinding in the html part of the page. I searched google but I didn't find anything useful. Thanks in advance
-
.net webservices tracking usps and upsThanks for your answer. So in order to use the ups tracking code webservice I will need to contact UPS or...?
-
.net webservices tracking usps and upsHello - do you guys know if there are some webservices out there which we can call for getting tracking info for shipped items? Thx, Laziale
-
if statement in the html code in aspx pageFirst, thanks for your reply. I tried that thing too, but I am getting no value for the label. Here is what I have: in the html part:
<div style="padding-left: 10px; padding-right: 10px; text-align: left; width:45%">
<asp:Label ID="lblFirstName" runat="server" Text='<%#Server.HtmlEncode(Eval("FirstName").ToString())%>'></asp:Label>
</div>in the code behind:
protected void gvPpl_DataBound(object sender, GridViewRowEventArgs e)
{for (int i = 0; i < gvPpl.Rows.Count; i++) { Label lblL = (Label)gvPpl.Rows\[i\].Cells\[2\].FindControl("lblFirstName"); Label lblL1 = (Label)gvPpl.Rows\[i\].Cells\[1\].FindControl("lblFirstName"); Label lblL2 = (Label)gvPpl.Rows\[i\].Cells\[0\].FindControl("lblFirstName"); Label lblL3 = (Label)gvPpl.Rows\[i\].Cells\[3\].FindControl("lblFirstName"); } }
I am trying with different cells, just in case I have the wrong cell, but that is not helping, all the labels have no text. Any advice? Thx, Laziale
-
if statement in the html code in aspx pageI am trying this on button event:
for (int i = 0; i < gvPpl.Rows.Count; i++)
{
Label lblL = (Label)gvPpl.Rows[i].Cells[2].FindControl("lblFirstName");
}but nothing comes up. Can you give me some example how I can do that, and how I can set the forecolor afterwards. Eval container was there before I started working on this code. Please advice if I can/need to use something else and still get the same data. Thx, Laziale
-
if statement in the html code in aspx pageI am trying to solve this issue in the code behind file, but I am trying almost two days now without any success. The thing is that the label is in templatefield within gridview and I am having hard time to solve how I can get to the label in the gridview, check the text and set the forecolor depending on the text. If you have good example how I can solve this in code behind file I will be more then pleased to accept that. Thanks, Laziale
-
if statement in the html code in aspx pageHello, I want to create if statement in the html part of my site. Can someone help me with that and give me some example. I have a label and depending from the text, the forecolor to be different. Here is what I have:
<asp:Label ID="lblFirstName" runat="server" Text='<%#Server.HtmlEncode(Eval("FirstName").ToString())%>'></asp:Label>
So depending on the text, for example if the text contains 'John' text will be in red, if the text contains 'Jim' text will be in blue. Thanks for any advice, Laziale
-
change forecolor of a label in gridview [modified]ok, there were two events for the same thing, that why it wasn't triggered. Now its triggered, but for some reason when I am stepping in to the code the label property doesn't get the text. Its left empty. Here is the code:
void gvOrderProductVariants\_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { Label lblFirstName= (Label)e.Row.FindControl("lblFirstName"); if (lblFirstame.Text.Contains("John")) lblFirstName.ForeColor = System.Drawing.Color.Red; } }
Please tell me if I am doing something wrong. Thx, Laziale
-
change forecolor of a label in gridview [modified]I can't get to the 'e' argument since the databound event is using EventArgs. :( Thanks for your help though
-
change forecolor of a label in gridview [modified]nothing is happening with that one, I have the event set but its not triggered at all. The page loads without triggering that event. But thanks for your help anyway. Laziale
-
change forecolor of a label in gridview [modified]cause I want to display the proper color before the site is rendered on the screen. Is there a way how I can trigger that event in the Page_Load? Thanks, Laziale
-
change forecolor of a label in gridview [modified]Thanks for all your help. I have one question, since I am trying to figure out the color of the label in the page_load event, is there anyway how I can assign the color depending from the text in that label? Thx, Laziale
-
change forecolor of a label in gridview [modified]I just removed the and tags because of some formatting issue of the site :).
-
change forecolor of a label in gridview [modified]can you give me some example how I can do ItemDataBound event? Thanks for your help
-
change forecolor of a label in gridview [modified]Hello - I want to change the forecolor of a label in a gridview I have, depending on the text in that label. I can't access the label by the ID in the code-behind to get the properties. The label is part of templatefield: <div> <asp:Label ID="lblFirstName" runat="server" Text='<%#Server.HtmlEncode(Eval("FirstName").ToString())%>'></asp:Label> </div> Thx, Laziale
modified on Monday, March 15, 2010 3:54 PM
-
How to get the index of the gridview with click of asp buttonthere is no rowIndex under EventArgs e. I have just Equals, GetHashCode, GetType and ToString. Thx for your help though. Laziale
-
How to get the index of the gridview with click of asp buttonhello thx for your reply and here is my code: backend:
protected void updateNote(object sender, GridViewCommandEventArgs e)
{
string selectedIndex = "";
int index = 0;
index = Convert.ToInt32(e.CommandArgument);
// index = 1;
// Button bttn = (Button)sender;GridViewRow row = gvOrderNotes.Rows\[index\]; ListItem item = new ListItem(); item.Text = Server.HtmlDecode(row.Cells\[3\].Text); selectedIndex = item.Text; }
html:
<ItemTemplate>
<asp:Button runat="server" ID="ChkUpdate" onclick="updateNote" AutoPostBack="true" Width="160%" Text="Update Order"/>
<ajaxToolkit:ConfirmButtonExtender ID="chkUpdateConfirmBtnExtender" runat="server" TargetControlID="chkUpdate" DisplayModalPopupID="modalPopupExtenderChkUpdate"></ajaxToolkit:ConfirmButtonExtender>
<ajaxToolkit:ModalPopupExtender ID="modalPopupExtenderChkUpdate" runat="server" TargetControlID="chkUpdate" PopupControlID="pnlChkUpdate"
OKControlID="chkUpdateOK" CancelControlID="chkUpdateCancel" BackgroundCssClass="modalBackground" />
</ItemTemplate>Thx for your help one more time. Laziale
-
How to get the index of the gridview with click of asp buttonHello - I want to get the index of the row where the button is clicked. Please note that I am using EventArgs, not GridViewCommandEventArgs, since with GridViewCommandEventArgs nothing is happening, once the button is clicked. Thx, Laziale