|
-----javascript----------------
function SelectTab(itemID,tkID)
{
ob_em_SelectItem(itemID);
window.frames['tabIframe'].location.replace("../page/" + itemID + ".aspx?itemID=" + itemID + "&tkID=" + tkID + "");
}
------asp client code----------
<oem:MenuItem InnerHtml="<span style='cursor:default'>ItemName</span>"
ID="STU0001" OnClientClick="SelectTab('STU0001','<%#txtItemID.ClientID %>')" >
</oem:MenuItem>
return result page:
/page/STU0001.aspx?itemID=STU0001&tkID=<%#txtItemID.ClientID %> ---->got an error here
it should
/page/STU0001.aspx?itemID=STU0001&tkID=1020 --> or whatever the value of txtItemID.ClientID
how to pass a value to javascript function from a textbox?just like above which is not correct.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
modified on Saturday, November 6, 2010 3:37 AM
|
|
|
|
|
Because you are passing id as string. Use client id directly in javascript as:
ob_em_SelectItem('<%= txtItemID.ClientID %>');
window.frames['tabIframe'].location.replace("../page/" + '<%= txtItemID.ClientID %>' + ".aspx?itemID=" + itemID + "&tkID=" + tkID + "");
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
thanks. i got it.
another problem.please help me.
function getValue(passID)
{
document.getElementById("txtPropID").value =passID
}
<asp:TemplateField HeaderText="PropID">
<ItemTemplate>
<a href="javascript:getValue('<%# Eval("PropID")% >')">
<%#Eval("PropID")%></a>
</ItemTemplate>
</asp:TemplateField>
<asp:Button ID="btnSTU12" runat="server" Text="STU12" OnClientClick="javaScript:window.showModalDialog("../page/STU0012.aspx?propID="+ '<%=txtPropID.Text%>' + "","","");
result: page/STU0012.aspx?propID= -->returns empty string
note: txtPropID has always a value.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
modified on Sunday, November 7, 2010 7:41 PM
|
|
|
|
|
solve my own problem.
instead of this.
("../page/STU0012.aspx?propID="+ '<%=txtPropID.Text%>' + "","","");
i use
document.getElementById('<%=txtPropID.ClientID%>').value
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
hi guys
i have a mobile website that run at windows mobile that has printer
i want to print a page from web page i can do this in windows application and now
how to print this with web ?
|
|
|
|
|
I am no expert in mobile websites but I imagine it's the same principle involved as with any website: you can (just) use a javascript call to open the client's "Print" dialog - after that it's up to them. Unlike a windows applciation, you cannot access their printers directly.
|
|
|
|
|
I've been baning my head against the wall for the better part of a day on this issue. I cannot run my coded web performance test.
I'm using VS 2010 Ultimate.
I can do the steps below with no problem using other solutions (even by creating a new solution!) but not with one particular solution.
Here's what I've done:
1) Added a web performance test project to my solution
2) recorded a few mouse clicks in the open browser window
3) ran (repeatedly) the resultant web performance test. Works great!
4) Clicked the Generate Code button in the web test viewer window, which does create a .cs test
5) Chose Test-> Run -> All Tests in Solution. Only the original web performance test shows up in the Test Results window
I want/need the .cs test to compile because I need the .dll for use with a test plan from within Test Manager.
ANY help would be GREATLY appreiciated. Thank you.
--------------------------------------------------------------------------------
jboyd
|
|
|
|
|
FINALLY! OK, here's what I did to resolve the issue:
1) From the Build menu I chose to Build my test project. Building/Rebuilding the solution did NOT do the trick. I had to explicitly choose my test project name from the Build menu.
2) Then I selected Test ->Windows -> Test View. This showed my web performance AND coded tests.
Hope this helps others who have this issue!
|
|
|
|
|
Isn't it amazing how you can spend hours/days failing to solve something, then within 10 minutes of giving up and posting a question about it, you suddenly figure it out for yourself! (Happened to me on more than one occassion.)
|
|
|
|
|
Amazing at times, annoying at others!
|
|
|
|
|
Hi,
I have form with 3 tabs,
i each one i have a grid.
My problem is - sometimes i'm getting this error when i'm pressing the EDIT button.
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
At the first time nothing happens,
but at the second click i'm getting the above error
Can someone please please help me?
Thanks;
Tamir
Here is an example of one of the grids (i post only one column):
<asp:GridView ID="GridViewTransTab" runat="server" ShowFooter="True" AutoGenerateColumns="False"
DataKeyNames="fName,main,startHour,endHour" OnDataBinding="GridViewTransTab_DataBinding"
OnRowDataBound="GridViewTransTab_RowDataBound" OnRowCreated="GridViewTransTab_OnRowCreated"
OnRowCancelingEdit="GridViewTransTab_RowCancelingEdit" OnRowCommand="GridViewTransTab_RowCommand"
OnRowEditing="GridViewTransTab_RowEditing" OnRowUpdating="GridViewTransTab_RowUpdating"
BackColor="#00CCFF" BorderWidth="2px" Font-Names="Arial" Font-Size="12pt" OnRowDeleting="GridViewTransTab_RowDeleting"
EnableViewState="true">
<RowStyle BorderWidth="2px" />
<Columns>
<asp:TemplateField HeaderText="Full Name">
<EditItemTemplate>
<asp:DropDownList ID="txtFullNameTrans" runat="server" DataTextField="FullName" DataValueField="PersonId">
</asp:DropDownList>
</EditItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="txtFullNameNewTrans" runat="server" DataTextField="FullName" DataValueField="PersonId">
</asp:DropDownList>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="lblFullNameTrans" runat="server" Text='<%# Bind("fName") %>'></asp:Label></ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit" ShowHeader="False">
<EditItemTemplate>
<asp:LinkButton ID="lbkUpdateTrans" runat="server" CausesValidation="False" CommandName="Update"
Text="Update "></asp:LinkButton><asp:LinkButton ID="lnkCancelTrans" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel"></asp:LinkButton></EditItemTemplate>
<FooterTemplate>
<asp:LinkButton ID="lnkAddTrans" runat="server" CausesValidation="False" CommandName="Insert"
Text="Insert"></asp:LinkButton></FooterTemplate>
<ItemTemplate>
<asp:LinkButton ID="lnkEditTrans" runat="server" CausesValidation="False" CommandName="Edit"
Text=" Edit"></asp:LinkButton></ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:CommandField HeaderText="Delete" ShowDeleteButton="True" ShowHeader="True" />
</Columns>
<FooterStyle BorderWidth="2px" Font-Names="Arial" Font-Size="12pt" />
<HeaderStyle BorderWidth="2px" Font-Size="14pt" />
<EditRowStyle BackColor="#33CC33" />
</asp:GridView>
|
|
|
|
|
Can you add the code behind, if you are adding a control dynamically (something like Controls.Add(myControl); ), not doing this at postback is the most likely cause of your error (as the exception states).
|
|
|
|
|
Keith Barrow wrote: if you are adding a control dynamically (something like Controls.Add(myControl);), not doing this at postback is the most likely cause of your error (as the exception states).
I'm not using this command.
Controls.Add(myControl);
Keith Barrow wrote: Can you add the code behind
My code is very very long,
i don't think it's smart to post it here.
|
|
|
|
|
Can someone please help me with this problem?
I'm stuck
|
|
|
|
|
This is considered rude. See the FAQs and guidance stickies at the top of the forum.
I've told you what the problem probably is (dynamically added controls), and asked for the code. I am 80% certain you are adding a control in code-behind that is being accessed in postback before it is getting re-added, but without the code it is impossible to tell.
|
|
|
|
|
hi sir/madam
we r trying to execute this code from asp webform. its asking us to add namespaces...we r not able to to understand wat r the namespaces for this. so plz send me the namespaces..to this mail:lavibyni@gmail.com if any one konws it.
|
|
|
|
|
lol
Your Subject is not the same as your content. What is exactly your problem ?
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
<%@Import namespace= 'System.Text' %>
<%@Import namespace= 'System.IO' %>
<%@Import namespace= 'System.Net' %>
<%@Import namespace= 'System.Web' %>
<%@Import namespace= 'System.Web.UI' %>
<%@Import namespace= 'System.Web.Services' %>
|
|
|
|
|
Forgive if it is not a right place to post this question
See Am developing a web based social networking website in ASP.NET say X-Netowork.. This is connected with VSS and also we are having number of portals with minor changes in logo and some labels say for ex Y-Network, Z-Network etc.
I am facing a problem every week end to integrate the changes done in X-Network to Y-Network and Z-network..
Is there any other way to do this easily without manual integration
Expecting your help
Ahamed Azeem
software Programmer
|
|
|
|
|
I dont understand your problem. Please explain clearly.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Thank u for your reply
We are developing a social networking website for some clients.
Basic website xnetwork
And we are having ynetwork, znetwork same as xnetwork.
But still the developing is going on with xnetwork.. Each and every change done in xnetwork has to be updated with ynetwork and znetwork... My question is "Is there any way to handle it without manual work"
Regards
Ahamed Azeem
software Programmer
|
|
|
|
|
Unfortunately, it depeds on how you designed your website. e.g if you want these sites to share a Data Layer , what you can do is that create a Data Layer and a Business logic layer as DLL's at the end when you deploy you will not need to do anything but deploy the dll's and nothing else. So i am not sure what part of your website is a maintanance nightmare , but what you are experiencing means that its time to componetise your functionalities in your website.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
You probably should just start using resx files. That will handle changing of images and labels. If you actually have different pages, or different functionality on the same page in different sites, then it gets much more complicated.
|
|
|
|
|
how to trigger enter key in gridview column?
column1 column2 column3
3 2 6
4 4 16
1 2 2
formula:
column1 * column2 = column3
when i press enter key in column2 after i input number ,
it will automatically update the column3 for result
and refresh the gridview. how to do that?
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
Add javascript to calculate total in onblur event of the textbox in EditTemplateColumn of Column2 in the GridView.
..Go Green..
The 30,000th post in Site Bugs / Suggestions[ ^] recently is my 3rd feat in posting the magical numbered post. I posted the 500th and 1000th post in GIT.
|
|
|
|