|
U know that i used try & catch in my code. When i run that page in IIS exception i defined in code get running.
The exception is not thrown from IIS
Exception thrown from C# code defined by me.
|
|
|
|
|
Hi,
I am creating 5 dynamical text box in my page_init event - After cteating i can enter value to the Text boxes .. Then when i click the button i cannot take the id of the dynamically cteating text ... How to resolve this problem.. i ll write my code below
Dim txtEmpty(10) As TextBox
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
If Page.IsPostBack = False Then
Dim tbl As New HtmlTable
Dim tr As New HtmlTableRow
plc.Controls.Add(tbl)
tbl.Rows.Add(tr)
dim i as new integer
For i = 0 To 6
Dim tc2 As New HtmlTableCell
Dim txt As New TextBox
txt.ID = i & "txt"
txtEmpty(i) = txt
tc2.Controls.Add(txt)
tr2.Cells.Add(tc2)
Session("txt") = txtEmpty
Next
end if
End Sub
Note: After Loading the page 6 text boxes are sucessfully created then am entering some text of the textboxes...Then am click the Button i cannot take the value of the text box...
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim txt1(7) As Object
For intFile = 0 To 10
txt1(intFile) = CType(Session("txt"), Object)
Next
End sub
There NO Text property of boject so How can i take the text value from the respective textboxes?????????
Thanks & Regards,
Kannak.....>
kannak
|
|
|
|
|
sekannak wrote: CType(Session("txt"), Object)
Instead of Object use TextBox...
Be an Eagle, Sky is Yours.
|
|
|
|
|
Hi,
Actually i tried first - > ctype(session("txt"),textbox) but its shows error convertion of Contral Array textbox[]..
the value of session("Txt") is already having value of Control Array TextBox[]....
so that i used to convert object....How to resolve this problem..
Thanks in Advance.....
regards,
kannak.......
kannak
|
|
|
|
|
how can select any control at the run time when click on this control
|
|
|
|
|
please be a bit clear.......
|
|
|
|
|
please take your time before you post and read what you wrote and make sure that other person will understand this
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
First of all Welcome to codeproject.
ritasaumya wrote: how can select any control at the run time when click on this control
This is your first post. Please read forum guideline for how to use this forum.
And read it,
How to get an answer to your question[^]
Hope this will help you next time onwards.
|
|
|
|
|
Hi ,
I am using Master page for my page. in this page i have gridview inside updatepanel . I want to export that gridview to excel. while doing this i am getting error Like this
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.Details: Error parsing near '<table rules="all" b'.
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '<table rules="all" b'.
eventhough i added following :
EnableEventValidation ="false"
<asp:AsyncPostBackTrigger ControlID="btn_export" EventName="Click" />
MY ASPX Page
<%@ Page Language="C#" MasterPageFile="~/C2SFAMaster.master" AutoEventWireup="false" EnableEventValidation ="false" CodeFile="GDNReport.aspx.cs" Inherits="GDNReport" Title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit, Version=1.0.11119.21057, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"
Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table >
<tr>
<td>
<TABLE class="TableBgColor"><TBODY><TR class="TableHDColor"><TD colSpan=6>Sample Dispatch Note Report</TD></TR>
<TR>
<td>Select Fs</td>
<td>
<asp:DropDownList ID="cmb_fs" runat="server" Width="200px" AppendDataBoundItems="True" SkinID="DropDowns">
<asp:ListItem Value="-99">--------------------ALL------------------</asp:ListItem>
</asp:DropDownList></td>
<td>DateFrom</td>
<td><asp:TextBox id="txt_frdate" runat="server" SkinID="Textboxs"></asp:TextBox><cc1:CalendarExtender id="CalendarExtender1" runat="server" TargetControlID="txt_frdate" Format="d/MM/yyyy">
</cc1:CalendarExtender></td>
<td>DateTo</td>
<td><asp:TextBox id="txt_todate" runat="server" SkinID="Textboxs"></asp:TextBox><cc1:CalendarExtender id="CalendarExtender2" runat="server" TargetControlID="txt_todate" Format="d/MM/yyyy">
</cc1:CalendarExtender></td>
</TR></TABLE>
</td>
</tr>
<tr><td align ="center" > <asp:Button ID="btn_view" runat="server" Text="View" OnClick="btn_view_Click" OnClientClick="return viewcheck();" CssClass="Button" /></td></tr>
<tr><td align ="center" >
<asp:UpdatePanel id="swpnl" runat="server" UpdateMode="Conditional">
<contenttemplate>
<asp:GridView ID="gdview" runat="server" OnRowDataBound="gdview_RowDataBound" OnRowCreated="gdview_RowCreated" style="position: relative">
</asp:GridView>
</contenttemplate>
<triggers>
<asp:AsyncPostBackTrigger ControlID="btn_view" EventName="Click"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="btn_export" EventName="Click" />
</triggers>
</asp:UpdatePanel>
<asp:Button ID="btn_export" runat="server" CssClass="Button" OnClick="btn_export_Click"
Style="position: relative" Text="Export To Excel" />
</td></tr>
</table>
</asp:Content>
Thanks in advance,
Azeez
|
|
|
|
|
Where is your ScriptManager in Master Page ?
|
|
|
|
|
Hi
I am also facing the same exception.I am using the script manager and Ajax update panel in the master page
hi
|
|
|
|
|
|
|
|
|
|
this seems to be a fantastic idea.... why can't you try it by your own....
|
|
|
|
|
NO
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
|
Hi All ,
I have to create fish bone diagram in flash mx or flex builder 3. please help me to find out the solution. Sorry if this forum is wrong place to ask this question . but i need urgent solution .
Thanks and regards ,
Amit Patel
|
|
|
|
|
Amit Patel1985 wrote: I have to create fish bone diagram in flash mx or flex builder 3.
How does it related to ASP.NET ?
Amit Patel1985 wrote: please help me to find out the solution.
Better you find on Online Forum of Flash and Flex. AFAIK : Flex Online help is fantastic.
Amit Patel1985 wrote: Sorry if this forum is wrong place to ask this question
Yes. This is wrong place.
Amit Patel1985 wrote: but i need urgent solution .
Not for all.
|
|
|
|
|
Amit Patel1985 wrote: Sorry if this forum is wrong place to ask this question . but i need urgent solution .
If you need a fish bone diagram, gut a fish and grab a pencil. If you want a better answer, choose a forum that has something to do with your question.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: If you need a fish bone diagram, gut a fish and grab a pencil.
You are just amazing sometimes, Christian.
|
|
|
|
|
hi all,
this is code behind:
[System.Web.Services.WebMethod, System.Web.Script.Services.ScriptMethod()]
public static DataView getAccounts()
{
try
{
string strCon = ConfigurationManager.ConnectionStrings["TFConnectionString"].ToString();
SqlDataSource db = new SqlDataSource();
db.ConnectionString = strCon;
db.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
db.SelectCommand = "getAccounts";
db.SelectParameters.Add("loginId", "K");
DataSourceSelectArguments args = new DataSourceSelectArguments();
DataView lst = (DataView)db.Select(DataSourceSelectArguments.Empty);
return lst;
}
catch (Exception ex)
{
return null;
}
}
and this is javascript:
function f1()
{
PageMethods.getAccounts(callSuccess, callFailuer);
}
function callSuccess(result)
{
alert(result[0]["account_nick"]);
}
function callFailuer()
{
alert('Fail');
}
in codebehind lst [DataView] shows records but on javascript its call failuer methode why?
i just want pass the data to javascript as a list.
thanks
modified on Thursday, August 13, 2009 12:33 PM
|
|
|
|
|
DataView is not serialized. You need to pass XML or JSON serialized data objects through return.
Rather than going like this, I recommend to use a comma separated string to pass data to the javascript function.
|
|
|
|