|
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.
|
|
|
|
|
All --
Please help.
I have a simple question about design patterns.
I need a quick design-pattern spot-check and thought a guru might have a minute.
I am not certain which design-patterns (if any) I am using or if I am using them correctly.
The short story...
I have a 1-to-1 mapping of DatabaseRow-to-Entity, where each Entity class just holds data.
I have a 1-to-1 mapping of EntityManager-to-Entity, where each EntityManager class just handles CRUD operations for its Entity.
If handling multiple Entity objects, they are collected into typed collections that are data-bindable.
I have a single DataContext that is used only by the EntityManager classes, and the DataContext knows how to connect to the database and run SQL-based CRUD operations
I think this uses TableModule + TableDataGateway + RowDataGateway + DataMapper.
What do you think?
The long story...
Here is what I do.
For each database table, I have one simple "Entity" class that maps directly to the table row. The Entity exposes each database column as a public property. The only logic in the Entity is validation logic, (such as IncomingValueForProperty1CannotExceedNCharacters, IncomingValueForProperty2CannotBeNull, etc), which simply throws an exception if there is a validation error. There is nothing else in the Entity class-- no SQL, no connection information, no database information, no SaveMethod, no UpdateMethod, nothing, etc. In short, the Entity just holds data. A sample name would be "AddressEntity".
Multiple Entity objects are collected in various says, such as a typed-collection, an array of objects, an EntitySet, or similar.
For each Entity, I have an "EntityManager" class. The sample name would be "AddressEntityManager". The EntityManager has methods like Create(AddressEntity targetEntity) and Retreive(object ID) and Update(AddressEntity targetEntity) and Delete(object ID). The Manager knows how to get data from the database based on an ID and return the data as a Entity. The Manager knows how to take an Entity passed to it and save the Entity to the database. Etc. The EntityManager uses the DataContext.
There is a single "DataContext" class that is used by all EntityManager classes. The DataContext class that knows how to connect to the database and conduct low-level CRUD, SQL-based operations.
This is very easy to implement and use. In particular, it is very clear to see who does what in terms of responsibility. The Entity holds data. EntityManager performs CRUD operations on an Entity. Need an Entity? Ask an EntityManager. Where is the data? Look in an Entity. Who does the work? The EntityManager. Who holds the data? The Entity. Need to do something to an Entity? Ask an EntityManager. It is transportable, in that it can be used on virtually any typical database-driven application. IMHO and IME.
A typical implementation is ASP.NET plus C# plus Linq-To-Sql (or Linq-To-Entities) plus SQL Server.
What pattern (or patterns) are expressed here?
I do have some ideas about which patterns are used. This way of working seems to have aspects of several patterns.
For "Domain Logic Patterns", it seems to have aspects of...
Table Module
http://www.martinfowler.com/eaaCatalog/tableModule.html[^]
For "Data Source Architectural Patterns", it seems to have aspects of...
Table Data Gateway
http://www.martinfowler.com/eaaCatalog/tableDataGateway.html[^]
Row Data Gateway
http://www.martinfowler.com/eaaCatalog/rowDataGateway.html[^]
Data Mapper
http://www.martinfowler.com/eaaCatalog/dataMapper.html[^]
However, I want to get your views on the matter, especially to help correct the design and improve it.
What do you think?
Please advise.
Thank you.
-- Mark Kamoski
modified on Thursday, August 13, 2009 1:27 PM
|
|
|
|
|
It's an interesting quesiton. First I'd ask, why do you want to know? What value will you receive in mapping patterns to your existing solution? I'm just curious, usually it's the other way around: you have a set of business requirements, then apply various patterns up front during the design process.
|
|
|
|