|
Yes, people will use it, and people already do. Just the other day someone was posting about how they found out an old employee used code generators. I have used code generators for CSS. It isn't worth the manual labor required to do what can take seconds.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi,
i have one problem. I create web site in VS.2008 on .NET 3.5. On my parent page i have iframe which source attribute src i populate dinamically in code behind :
HtmlControl frame1 = (HtmlControl)this.FindControl("ifrCache");
frame1.Attributes["src"] = "form.aspx?form=" + formID;
Iframe source is child page who have input text field.
Is there any way to get value of input text fields on parent page from iframe source page?
|
|
|
|
|
Yes, you can access the controls on the IFrame page just like you did with this:
c#ivan wrote: HtmlControl frame1 = (HtmlControl)this.FindControl("ifrCache");
You have to do it on the IFrame Document though, but same idea.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Another problem is that HtmlControl frame1 = (HtmlControl)this.FindControl("ifrCache");
return null but i add runat=server to ifrCache so i can use it like server control and it works. The same problem still persists. I do not know how to access to controls in iframe? Is it javascript solution?
|
|
|
|
|
I have gridview for update by template field. Update activate with click twice. How can i make it work with single click? This is coding
.aspx ->
<asp:BoundField DataField="ITM_MGRP" HeaderText="M-Grp" ReadOnly="True" />
<asp:BoundField DataField="ITM_SGRP" HeaderText="S-Grp" ReadOnly="True" />
<asp:BoundField DataField="POD_ITEMID" HeaderText="ID" ReadOnly="True" />
<asp:BoundField DataField="ITM_DESCIP" HeaderText="Description" ReadOnly="True" />
<asp:BoundField DataField="IVD_UPC" HeaderText="UPC" ReadOnly="True"><HeaderStyle Width="0px" /><ItemStyle Width="0px" /></asp:BoundField>
<asp:BoundField DataField="POD_UNIT" HeaderText="Unit" ReadOnly="True" />
<asp:BoundField DataField="POD_QTY" HeaderText="Ord Qty" ReadOnly="True">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:TemplateField HeaderText="Rcv Price">
<ItemTemplate>
<asp:Label ID="lRCVPRI" runat="server" Text='<%# Bind("RCVPRICE") %>' Width="40px"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtRCVPRI" runat="server" Text='<% Bind("RCVPRICE") %>' Width="40px"></asp:TextBox>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Rcv Qty" >
<ItemTemplate>
<asp:Label ID="lRCVQTY" runat="server" Text='<%# Bind("RCVQTY") %>' Width="30px"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtRCVQTY" runat="server" Text='<% Bind("RCVQTY") %>' Width="30px"></asp:TextBox>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit" ShowHeader="False">
<EditItemTemplate>
<asp:LinkButton ID="lbkUpdate" runat="server" CausesValidation="true" CommandName="Update" Text="Update"></asp:LinkButton>
<asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="false" CommandName="Edit" Text="Edit"></asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
.aspx.cs ->
protected void grpITEM_RowEditing(object sender, GridViewEditEventArgs e)
{
grpITEM.EditIndex = e.NewEditIndex;
}
Please help me.
|
|
|
|
|
In the rowEditing and rowUpdating events, call the function which will load your grid.
In your above example, after setting the newEditIndex, you need to load your grid again.
Surendra Prasad
|
|
|
|
|
How can I do that? Please let me know little more detail.
|
|
|
|
|
Assume the following is your gridview rowediting event
private sub gridview_rowediting()
'this will be your code.
gridview.editindex = e.neweditindex();
'call the function which loads your data - see be low
loadData()
end sub
'This is the function which loads data in your grid.
private sub loadData()
query = "select * from ..."
.
.
.
gridview.datasource = dataTable
gridview.databind()
end sub
|
|
|
|
|
Web Page setting ->
<asp:checkbox id="chkBILL" runat="server" text="Receiving Bills" oncheckedchanged="chkBILL_CheckedChanged" tooltip="Check if you input for billing">
.aspx.cs ->
protected void chkBILL_CheckedChanged(object sender, EventArgs e)
{
if (chkBILL.Checked == false)
{
lRCVTYPE.Text = "P/O No";
cmdLKPO.Enabled = true;
lBILLDTID.Visible = false;
txtBILLDT.Visible = false;
}
else
{
lRCVTYPE.Text = "Bill No";
cmdLKPO.Enabled = false;
lBILLDTID.Visible = true;
txtBILLDT.Visible = true;
}
}
This is coding. When I checked check box, cs coding is not activated. How can I make it work when check box checked? Please help me.
|
|
|
|
|
Set AutoPostback=true
You'd do better IMO to write javascript to do this, so that there's no need for a postback.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm still new at ASP.NET and java coding. How can I do that? any example?
|
|
|
|
|
<asp:checkbox id="chkBILL" runat="server" text="Receiving Bills" oncheckedchanged="chkBILL_CheckedChanged">
tooltip="Check if you input for billing" AutoPostBack="true" />
|
|
|
|
|
Is it possible to read the sessions data from any active session in my server??
Ill have an online support chatroom
Customers will place items on their "shopping cart" which will be stored in session until they choose to submit it
In order to help them, i migh need to read their shopping cart from their session
Is this possible or do i have to save their shopping cart to the DB?
Ill appeciate any feedback
Thanks in advance
Alexei Rodriguez
|
|
|
|
|
If you're using SQL Server to store session state, then it's probably possible. But, you'd have to work out the clients session Id to do it, I think it would be easier just to store the data in your DB.
you expect to have to provide support for a shopping cart ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Is there any way of doing the same you sugget but with inProc sessions?
Christian Graus wrote: you expect to have to provide support for a shopping cart ?
I meant that ill need to see whats on their shopping cart to help them without asking them for the products they have on the shopping cart
Thanks
Alexei Rodriguez
|
|
|
|
|
Hi All,
Is there is any tool or formatter available for working on malformed HTML produced when migrating a .net 2003 asp.net project to .net 2005. if there is any other way to recover this problem please advise me
Thanks n regards
Umashanker.K
|
|
|
|
|
I'm not sure why you would be getting malformed HTML simply by upgrading a project.
Maybe you could be more specific about the problems you are having?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I am having an intermittent problem showing a new window with javascript. When a user clicks a linkbutton on my page, it should show BalanceReport.aspx with the accompanying parameters, instead it does nothing. It always works on my system (naturally), it usually works on another users' system, and it never works on yet another users' system. In the Page_Load event I do some database stored procedure calls and fill a stringbuilder with HTML that is sent to the page. That seems to work. Javascript is enabled on our browsers (IE6 xpSp2). I am unsure where to look next.
In page_load:
const string cOnClientClickReportTemplate = "javascript:window.open('BalanceReport.aspx?CompPK={0}',";
const string cReportDialogArgs = "'newWindow','width=800,height=800,resizable=yes, menubar=yes,toolbar=yes');return false;";
lbtnReport.OnClientClick = String.Format(cOnClientClickReportTemplate, ViewState["CompPK"].ToString()) + cReportDialogArgs;
Any ideas? Thanks.
Someone's gotta be the last to know, but why is it always me?
|
|
|
|
|
Your question has nothing to do with ASP.NET.
Javascript questions should be posted in the Web Development forum.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Well, the problem is occurring on an ASP.NET page, so....
Someone's gotta be the last to know, but why is it always me?
|
|
|
|
|
goodideadave wrote: Well, the problem is occurring on an ASP.NET page, so....
So what? That doesn't make it an ASP.NET question.
The fact that you are using Javascript in conjunction with ASP.NET is irrelevent. Your question is Javascript-specific, it belongs in the Web Development forum.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
goodideadave wrote: Well, the problem is occurring on an ASP.NET page, so....
Are you doing this professionally? Then perhaps the "Work and Training Issues" would be a good forum? Is this occuring on a computer? Perhaps the "Hardware / Device Drivers" forum would fit?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
So, I guess you need to do a little bit of reading to understand where the line is, what ASP.NET is, what it does, and what questions are generic to all web apps (hint: ones that relate to javascript, css and HTML )
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Clearly I have erred. Thank you so very much for pointing me in the right direction.
Someone's gotta be the last to know, but why is it always me?
|
|
|
|
|
Hi,
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Modules_Admin_UploadEBook : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnAdminFileUpload_Click(object sender, EventArgs e)
{
if (FileUploadAdmin.HasFile)
try
{
FileUploadAdmin.SaveAs(Server.MapPath("Upload/" + FileUploadAdmin.FileName));
lblAdminFileUploadMessage.Text = "File Name:" + FileUploadAdmin.PostedFile.FileName + " " +
FileUploadAdmin.PostedFile.ContentLength + "kb " +
"Content type:" + FileUploadAdmin.PostedFile.ContentType;
}
catch (Exception ex)
{
lblAdminFileUploadMessage.Text = "ERROR:" + ex.Message.ToString();
}
else
{
lblAdminFileUploadMessage.Text = "You have not specified a file!!";
}
}
}
This code uploads a file I'm specifying in the "Upload" folder.Now,I want that when I'll upload any file,a folder with the same name of the file will be created within "Upload" folder and the file will be uploaded there.
Can anybody please help me out doing this?
Thank you
|
|
|
|