|
Hi,
I have 2 Gridviews on an aspx page. When I select a record in the first GridView, the second Gridview should display details of the record selected.
How would I go about doing this?
Illegal Operation
|
|
|
|
|
GridView offers a SelectedIndexChanged[^] event. Handle this event for the first gridview and bind second gridview from here.
|
|
|
|
|
I don't have much experience with them yet, but I believe you will probably have some good luck with updatepanels. I'd format one of the columns of the parent grid with a hyperlink (including some sort of ID of the record), then use a postback event handler to get the details of the child grid and bind the details to the grid.
Good luck.
Rob
http://tagyurit.com
|
|
|
|
|
Hello
When I run my website which have some tables the lines of table will appear. (no border)
it is where that colour of table is different from other table. a line is appear that is for bgcolour.
I hope that you understand what I said...
What should I do for disappaering these lines?
Thanks a lot
|
|
|
|
|
Try with CellPadding,CellSpacing or Border.May be it'll work.
|
|
|
|
|
As Arun suggested, check for CellSpacing and Padding.
Which browser are you using ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I want to send emails from site to gmail.But i don't have domain name registered.Please expain with name spaces that i have to include.
|
|
|
|
|
Send through your localhost... 127.0.0.1
Or if you want, you can also use your GMAIL server to send mails. ..
check this
<a="http: www.codeproject.com="" kb="" ip="" sending_emails_from_gmail.aspxail.aspx"="">Send Mails[^]
|
|
|
|
|
What is the use of namespace gmail...can it be done without that
|
|
|
|
|
I got it lol... thnx...
|
|
|
|
|
You are most welcome..
If you like to thank me always click on "Good Answer" Link associated with each message.
Thank you.
|
|
|
|
|
hello, i need to build a website as my project for final year.
basically its a community website (like orkut , myspace or hi5)
where you ask for login and pass in starting page...
then if user have account then it is redirected to its account.
if not... then register.. here is problem im having..
as when we register that person..the data is fed into database... like name address , about me etc..etc...
then how can i use that data to represent it like as it orkut...
and how to auto generate webpage as a person is sucessfully register
and has account.....
thanks in advance buddies
|
|
|
|
|
Well,nobody will not do your homework.
Start doing something by yourself and when you stuck then post here specific problem then sure you will get help from this forum.
Regards.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Hi
I am working on this legacy VB.NET 2003 application that loads controls dynamically.
Problem is that some of these controls also load nested controls dynamically...and then I can't seem to be able to debug them. The bug I am trying to fix is in one of these controls...lucky me.
Is there something I am doing wrong?
Guillermo Jimenez
|
|
|
|
|
Controls are loaded in the similar way in 2005.. Only thing is that the designer is hidden from the developer. There are .designer file associated with 2005 which holds those.
If the control is added without source, you cant go to the source to debug.. as we cant go F11 to see what is written inside FileInfo object...
If those controls are created by yourself, include the pdb file and add the dll directly with debug symbols. I think you can debug.
Or let us explain what exactly the problem, so that we could help something to fix.
|
|
|
|
|
Hi Dear, I've a serious problem, that is:
I've three asp:Contents in my content page. Content1 for head, Content2 is activated when user is logged in;By contrast, Content3 is for anonymous user.
In my program asp:UpdatePanel works properly in both content(Content2 & Content3). asp:UpdateProgress works properly in Content3(used for anonymous user) but doesn't work for Content2(used for logged in user)
<br />
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"><br />
</asp:Content><br />
<br />
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"><br />
<asp:UpdatePanel ID="UpdatePanel2" runat="server"><br />
<ContentTemplate><br />
<%=DateTime.Now.ToLongTimeString() %><br />
<asp:Button ID="Button1" runat="server" Text="Button" /><br />
</ContentTemplate><br />
</asp:UpdatePanel> <br />
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel2"><br />
<ProgressTemplate><br />
<img alt="Loading..." src="../Images/ajax-loader.gif" /><br />
Please wait...<br />
</ProgressTemplate><br />
</asp:UpdateProgress> <br />
</asp:Content><br />
<br />
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server"><br />
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server"><br />
<ContentTemplate><br />
<%=DateTime.Now.ToLongTimeString() %><br />
<asp:Button ID="UpdateButton_Click" runat="server" Text="Button" /><br />
</ContentTemplate><br />
</asp:UpdatePanel> <br />
<asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel1"><br />
<ProgressTemplate><br />
<img alt="Loading..." src="../Images/ajax-loader.gif" /><br />
Please wait...<br />
</ProgressTemplate><br />
</asp:UpdateProgress><br />
</asp:Content><br />
I don't understand which is my fault. Please help me.
shahdat
|
|
|
|
|
I have asked few query on your last post, as that was easily readable.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Has anyone used the Edraw component? I'm trying to save a Word document over http and cannot get it to work.
|
|
|
|
|
I don't understand how to update the row into the Datagrid to display a specific date format ??
[ds is my dataset]
foreach (DataRow r in ds.Tables[0].Rows)
{
string dateString1 = r["First_Resurvey_Date"].ToString();
DateTime dateTime=Convert.ToDateTime(dateString1);
string [] dateStringArray= dateTime.GetDateTimeFormats();
r["First_Resurvey_Date"]= dateStringArray[6]; [This doesn't work, I cannot just assign the specific value to a datagrid row/cell......I need help on how to do that] [dateStringArray[6], gives the date format as dd-MMM-YY, which is how I want to display my date in the application]
NotesLabel.Text= dateStringArray[6];
NotesLabel.Visible=true;
}
DataView view = ds.Tables[0].DefaultView;
resultsDatagrid.DataSource = view;
resultsDatagrid.DataBind();
resultsDatagrid.Visible = true;
|
|
|
|
|
RTFM
This does nothing but attempt to assign the value if the 5th element in the array to the column, it does not do any date formating.
string [] dateStringArray= dateTime.GetDateTimeFormats();<br />
r["First_Resurvey_Date"]= dateStringArray[6];
To format a date you need to do something like DateTime.ToShortDateString or DateTime.ToString(...)
only two letters away from being an asset
|
|
|
|
|
If you have read the code correctly, then you should notice that I have a string type 'dateString1' variable, which holds the string value of a date type data row from the datagrid[string dateString1 = r["First_Resurvey_Date"].ToString(); ]. My understanding could be wrong.
And then there is a DateTime type variable 'dateTime', which holds the DateTime type value of the String dateString1.[DateTime dateTime=Convert.ToDateTime(dateString1);]. And then the string array dateStringArray contains various date formats of the 'dateTime' variable from which I need to display [6].[string [] dateStringArray= dateTime.GetDateTimeFormats(); ] I do understand that the formatting doesn't change the datarow from the datagrid.
Now once I have got a specific format of the date I want to display to the user, I was looking for a way to display that specific format into the datagrid. Please let me know if there is any way to do that, I hope I conveyed correctly what I want to do.
Thanks in advance.
|
|
|
|
|
skhan17 wrote: I need help on how to do that] [dateStringArray[6], gives the date format as dd-MMM-YY, which is how I want to display my date in the application]
You where not clear in what you were asking for. This appears you are asking how to format a date
skhan17 wrote: r["First_Resurvey_Date"]=
Nor is it clear for this context that you want a format and not a date. The name seems to imply a date.
Override the DataBind event and set the value of the column directly rather trying iterate through the DataTable and change the value.
only two letters away from being an asset
|
|
|
|
|
What exactly did you mean by overriding the dataBind()?
|
|
|
|
|
|
hi all ,
this my codebehind on login button click
FormsAuthentication.Initialize(); FormsAuthenticationTicket ObjTicket = new FormsAuthenticationTicket(1, txtLoginId.Text, DateTime.Now, DateTime.Now.AddMinutes(60), false, txtLoginId.Text + "," + txtPassword.Text, FormsAuthentication.FormsCookiePath); string encTicket = FormsAuthentication.Encrypt(ObjTicket); string sLoginId = txtLoginId.Text; sLoginId = sLoginId.Replace(" ", ""); Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, encTicket)); Response.Redirect(FormsAuthentication.GetRedirectUrl(txtLoginId.Text, false)+"?id="+txtLoginId.Text);
and this is web config code
<authentication mode="Forms"> <forms defaultUrl="~/PresentationLayer/Forms/Main.aspx" loginUrl="~/Default.aspx" > </forms> </authentication>
above code well working on local host .......but on live host
"~/" append with url
for example i want
www.abc.com/abc/PresentationLayer/Forms/Main.aspx
but i get
www.abc.com/abc/~/PresentationLayer/Forms/Main.aspx
can anybody tell me that where is problem
|
|
|
|