|
put it in a label and change the text value of it?
maybe not the best way but it could work ...
|
|
|
|
|
Or just use a Hyperlink control
|
|
|
|
|
A GridView has it's AutoGenerateColumn set to true
This is how the code is
grid.DataSource = dt
grid.databind()
dt is a datatable and there is definitly data in it.
The problem is that the grid does not get populated.
Thanks
|
|
|
|
|
hi there I am an asp.net virgin and really want to get to grips with some of the features of using asp.net I recently finished a course on asp.net and we learnt the basic templates to building a shopping basket. However when at home on my own computer...for some strange reason the internet browser doesn't display the web page, but displays all the code instead??? Before you ask, yes I have tried it in firefox also? I'm sure it is a ridiculously simpe thing, but in order for me to start messing around with the templates and customising them to features that I want, I'll need to be able to see it....what should I do?(P.S I'm using dreamweaver also)....Please be gentle...I am fragile!
|
|
|
|
|
What's the code in your page look like (feel free to shorten it if there's a lot...)
|
|
|
|
|
hi thanks for the reply, it is literally the source code for the web page. From some research I found that maybe I cant view these files locally as I have windows xp home, not professional so I can't install some ssi or something. Does that sound about right. Therefore does this mean I will only be able to view these pages remotely?
|
|
|
|
|
An .aspx file is processed by the server where all the asp stuff is "translated" into HTML and spit out to the browser. If you aren't running IIS with the .NET framework installed then its not being processed. You need to have XP Pro (or 2k pro, or anything in the Server family) or you download Visual Web Developer Express Edition for free from MS which comes with a development webserver.
|
|
|
|
|
hai everyone
i am ajay
i have a problem related to java script.i have to open a modal dialog box on
"onselectedindexchanged" event of my dropdownlist.further my dropdownlist is a template column of my datagrid.
so here i can not use
dropdownlist.attributes.add("onselectedindexchanged","JVfun();")
on page load event.
how i can do this.
plz help me.
its urgent
thanks in advance
ajay
|
|
|
|
|
Hi Ajay,
You can add the that code in the OnItemDataBound event of the datagrid. There in that event you can find the dropdownlist control and then add the attribute you want.
Hope this will solve your problem.
Best Regards,
Apurva Kaushal
|
|
|
|
|
you have to add the onselectedindexchanged at the datagrids itemcreated
<br />
private void InitializeComponent()<br />
{<br />
this.dgMyDataGrid.ItemCreated += new System.Web.UI.WebControls.DataGridItemEventHandler(this.dgMyDataGrid_ItemCreated);<br />
this.Load += new System.EventHandler(this.Page_Load);<br />
}<br />
<br />
private void dgMyDataGrid_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)<br />
{<br />
try <br />
{<br />
(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) <br />
{<br />
DropDownList ddl = (DropDownList)e.Item.FindControl("ddlMyDropDownList");<br />
ddl.SelectedIndexChanged +=new EventHandler(ddlChanged);<br />
ddl.Attributes.Add("onselectedindexchanged", "JVfun();"); <br />
} <br />
else if(e.Item.ItemType == ListItemType.Footer) <br />
{<br />
}<br />
} <br />
catch (Exception err) <br />
{<br />
}<br />
}<br />
Hope it helps
Thomas
|
|
|
|
|
hai everyone
i am ajay
i have a problem related to java script.i have to open a modal dialog box on
"onselectedindexchanged" event of my dropdownlist.further my dropdownlist is a template column of my datagrid.
so here i can not use
dropdownlist.attributes.add("onselectedindexchanged","JVfun();")
on page load event.
how i can do this.
plz help me.
its urgent
thanks in advance
ajay
thanks
thomas
u have send me the code
but it is in c#.i m using vb.net
can u revert back with this code in vb.net
|
|
|
|
|
thanks
thomas
u have send me the code
but it is in c#.i m using vb.net
can u revert back with this code in vb.net
|
|
|
|
|
Hi,
I'm not an expert of asp.net, so be patient with me ...
My web application includes some aspx pages and only one class with common functions and sub-routines.
Everything works correctly, but when I try to run my application from two machines, one of the client crashes; after the crash, if I reload the page everything works normally.
It looks that my pages cannot have a concurrent access to the class.
The class is normally istantiated with the "new" keyword each time I call its subs - after the call I destroy the istance.
I'm sure there's something wrong with my code or configuration, but what ?
Any suggestion is welcome
Thanks,
Giorgio
A CRAY is the only computer that runs an endless loop in just four hours
|
|
|
|
|
Show the code? Is it a DB lock problem maybe?
|
|
|
|
|
Hi,
How to send mails automitically from our project in asp.net
like we are developing a project for jobportal here we want to send mails daily to users autometically..
help me for this..
Thanking you
balu
|
|
|
|
|
Hi Balu,
This code you can use to send the mail.
System.Web.Mail.MailMessage objMailMessage=new System.Web.Mail.MailMessage();
objMailMessage.From="FromField";
objMailMessage.To="WhomToSend";
objMailMessage.Subject="SubjectYouWant;
objMailMessage.Body="Message Body";
SmtpMail.SmtpServer = "MailServerName";
SmtpMail.Send(objMailMessage);
Hope this will solve your problem.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi Apurva,
Thankful your reply..
I want send Emails Autometically daily like we are getting from matrimonials and Jobportals without user intraction
my email id: balavardhanr@yahoo.com
Thanking you for reply..
balu
|
|
|
|
|
|
Is there a way to make sure that when the logout link in the loginstatus control is clicked then the user gets redirected to the login page?
This is what I am doing but when the logout link is clicked, the page does not get redirected.
Thanks
<asp:loginstatus id="LoginStatus1" runat="server"
="" cssclass="UserInfoLink" logoutaction="Redirect" logoutpageurl="login.aspx">
|
|
|
|
|
|
Is it possible to send an email with a background image using the html body format ?
I tried putting a background image , but the email received is plain with no background.
so wondering.
Can anyone throw some light
Thanks,
|
|
|
|
|
I know that the following tells me if the user (who is using the website)
is a member of Administrators
How about if I select a user from a drop down list and then check to see if that person is in the Administrators role?
Thanks
If (System.Web.HttpContext.Current.User.IsInRole("Administrator").ToString()) Then
End If
|
|
|
|
|
Hi,
A drop down list is populated using datasource as below
ddlUsers.DataSource = Membership.GetAllUsers
ddlUsers.DataBind()
But now I want the drop down to show the following item as the first item.
If I just use the following line, it gets added to the last item in the list.
ddlUsers.Items.Add("<-- select a user -->")
Thanks
|
|
|
|
|
Use the Insert method to specify where the item should be added:
ddlUsers.Items.Insert(0, "<-- select a user -->")
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Before binding value to the dropdown write the below code,
ddlUsers.Items.Clear();
newListItem = new ListItem();
newListItem.Value = "----Select a user---";
newListItem.Text = "----Select a user----";
ddlUsers.Items.Add(newListItem);
ddlUsers.DataSource = Membership.GetAllUsers
ddlUsers.DataBind()
Hope this helps u ..
|
|
|
|