|
Off the top of me head:
It would be easy to cover the page with a shim that has a nice Web 2.0 animated AJAX loading image (buzzword dump all the way!). This could be done with CSS so the rest of the page would be set to display:none while the shim would fill the whole page (or whatever portion it is you need hidden). You could then set the shim to display:none and display the hidden content once the control is loaded and ready.
The problem is knowing when this happens. document.onload wouldn't work as I assume thats where the control starts loading. The simplest option would be to set a timeout of how long it roughly takes for the control to load, then show the content, but this has loads of drawbacks as you never really know what the time will be.
So after all that it boils down to: does the control have an event that you can hook into that gets raised when the controls loads? If so, use that to hide the shim and show the content.
|
|
|
|
|
In a Gridview there are two templated linkbutton columns. I want to know that on which link(dataitem) the user has clicked.. data is bounded from database... Can any one help me?
pls see the code..
<asp:gridview id="GVDoctorActivity" runat="server" autogeneratecolumns="False" datakeynames="DoctorActivityId"
="" datasourceid="DoctorActivityDataSource" skinid="GridView" font-size="10pt" width="920px" enableviewstate="False" onselectedindexchanged="GVDoctorActivity_SelectedIndexChanged">
<columns>
<asp:boundfield datafield="DoctorId" headertext="DoctorId" sortexpression="DoctorId"
="" visible="True">
<asp:templatefield headertext="Campaign Name">
<itemtemplate>
<asp:linkbutton commandname="Select" id="lbtnCampaign" runat="server" causesvalidation="false"
="" text="<%# Eval("CampaignName") %>">
<asp:templatefield headertext="ProductName">
<itemtemplate>
<asp:linkbutton commandname="Select" id="lbtnCampaign" runat="server" causesvalidation="false"
="" text="<%# Eval("ProductName") %>">
The user may click on any one either on CampaignName or ProductName dataitem... I want to know on which item the user has clicked...? I am using asp.net 2.0 and C#
|
|
|
|
|
Hi
You can do this job by CammanName Property of the link button control and RowCammand Event of the GridView Control
|
|
|
|
|
body {<br />
background-image:url(Images/red.jpg);<br />
background-repeat:repeat-y;<br />
}
folders:
root
root/images
root/subfolder
this is my css coding
however whenever i navigated in the asp website to another folder (subfolder)
the css cant find the image file any way to solve this?
|
|
|
|
|
u have to add that same image folder in sub folder.. it will solve problem.
Thanks,
Sun Rays
|
|
|
|
|
Where is this CSS declared? By the sounds of things its in the page. the url() directive is relative to the document the CSS is in, in this case the page so the subfolder won't work. Move the CSS into an external file and reference it on each page, the url() should then point to the image relative to the CSS file.
So if you had folder:
root
root/css
root/images
root/subfolder
With your .css file in the root/css folder you'd want this:
body {<br />
background-image:url(../images/red.jpg);<br />
}
|
|
|
|
|
Hi,
I have a form which contains a gridview which I populate in the Page_Load method from a basic datasource (an ArrayList of objects). I want to be able to add items to the gridview from a button and I also need to be able to delete and ideally edit the new entries.
I've read about the GridView and it seems there are no simple ways of adding my items. Is there a way of reading the information from the GridView back into an arraylist, adding the new item to the arraylist and re-binding the gridview to the modified data source?
How about the deleting and editing items?
|
|
|
|
|
i want the event for Label like Button_click event.
How can i make it?
pl let me know.
thanks in advance.
|
|
|
|
|
Have you looked at either the LinkButton or HyperLink controls?
|
|
|
|
|
yeah,
i have seen LinkButton & Hyperlink, they are undrelined, i want the control which is not underlined.
once visit: www.microsoft.com
in this,some controls r there without underline
|
|
|
|
|
Have you thought about changing the style of the object so that it isn't underlined? That's how the other controls work.
|
|
|
|
|
ya that's wat i want, how to change the style of the object so that it isn't underlined?
thanks,
|
|
|
|
|
u can use CSS for that linkbutton.. so the line will be go...
text-decoration:none;
Thanks,
Sun Rays
|
|
|
|
|
Create lable web control i create with lable1 in page and place Label1.Attributes.Add("onclick","javascript:alert('this is done')");
in Page_Load event
-- modified at 6:48 Friday 30th March, 2007
|
|
|
|
|
You can write an event for Label_click by just double clicking the Label in the Visual Studio 2005 or whatever IDE you use. This creates an event handler for the specified Label click.
You don't have to be AFRAID!
|
|
|
|
|
Hi All,
I have a program where users login using username and password found in users table in sql. My aim is to make users login with their active directory account.
Any suggestions, sites i would be thankfull.
|
|
|
|
|
samerh wrote: Any suggestions
What sort of suggestions are you looking for? What bit are you stuck on?
|
|
|
|
|
All i know is that you need to do forms authentication to be able to talk to active directory, or am i wrong?
Unfortunaltely, i have never used this concept before and i am clueless about it. If you can redirect me to some usefull sites that covers the topic.
Thanks in advance.
|
|
|
|
|
|
Hi,
i want hyperlink lable for the web form but without underline.
please help me in doing it.
thanks in advance
|
|
|
|
|
use CSS for that.. define the link property to be not underlined..
or just edit the label tags in HTML view.
Kunal
|
|
|
|
|
when i execute my local web application the mail is going to gmail,yahoo if am not specifying mail.smptserver.
when i am specifying mail.smtpserver it's not working..ie,mail is not going...
but when i uploaded in net if i am not specifying mail.smtpserver it's showing error and when i give mail.smtpserver the mail is going to the emailid in that server but not going to yahoo mailid and all...
it's urgent for me to solve....
can anyone help me........
|
|
|
|
|
Hi all!
I just converted a .net 1.1 web project to .net 2.0 and now I'm getting a strange problem:
I have a custom class implementing IPrincipal to store the user identity in Context.User, sample code below. After storing the Principal i redirect from the login-page. When I retrieve the Context.User on the next page it is of type GenericPrincipal????? The user information is still there but of course not with my custom methods. I guess I could rewrite the code to use GenericPrinfipal instead, but why does this happen??? It did not happen before the conversion (and as far as I can think of I didn't make any other changes to the code).
I use Forms-authentication (using Windows authentication gives me the WindowsPrincipal when retrieving Context.User - i.e. the useridentity of the useraccount running the app, not of the user logged in to the web app).
I feel there has to be a logical explanation for this and I am grateful for any help!
Thanks!
/*******************************/
CustPrincipal newUser = CustPrincipal.ValidateLogin(TxtUsername.Text, TxtPassword.Text);
// Create the authentication ticket
FormsAuthenticationTicket authTicket = newUser.GetAuthenticationTicket();
// Now encrypt the ticket.
string encryptedTicket = FormsAuthentication.Encrypt(authTicket);
// Create a cookie and add the encrypted ticket to the
// cookie as data.
HttpCookie authCookie = new HttpCookie(FormsAuthentication.FormsCookieName,
encryptedTicket);
// Add the cookie to the outgoing cookies collection.
Response.Cookies.Add(authCookie);
// Add user to context
Context.User = newUser;
System.Threading.Thread.CurrentPrincipal = newUser;
/********************************/
|
|
|
|
|
Overridding Principal in:
protected void Application_PostAuthenticateRequest(object sender, EventArgs e)
Instead of
protected void Application_AuthenticateRequest(object sender, EventArgs e)
In Global.asax.cs worked for me in an ASP web application
Tim
|
|
|
|
|
Hi i have one dropdownlist and one button...if i selected the dropdownlist value and then clicked the button, the datas in the table have to be filtered using dataview...
I got the error in
dv=ds.Tables["selectemp"].Defaultview;
selectemp is the stored procedure...please do need full
With Regards,
Samson
|
|
|
|