Click here to Skip to main content
16,009,057 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: LinkButton onclick event is firing twice Pin
Not Active16-Apr-12 7:45
mentorNot Active16-Apr-12 7:45 
GeneralRe: LinkButton onclick event is firing twice Pin
indian14316-Apr-12 9:45
indian14316-Apr-12 9:45 
GeneralRe: LinkButton onclick event is firing twice Pin
Not Active17-Apr-12 12:46
mentorNot Active17-Apr-12 12:46 
QuestionAvoid page rendering multiple times Pin
indian14316-Apr-12 6:00
indian14316-Apr-12 6:00 
AnswerRe: Avoid page rendering multiple times Pin
Not Active16-Apr-12 7:43
mentorNot Active16-Apr-12 7:43 
Questionsoap headers are not added Pin
anandsurya16-Apr-12 0:04
anandsurya16-Apr-12 0:04 
Questionhow to add soap headers to the xml generated from webservice Pin
anandsurya16-Apr-12 0:00
anandsurya16-Apr-12 0:00 
QuestionHow to get values from Ajax Editor control inside the Details view??? Pin
Shivanand Arur15-Apr-12 21:23
Shivanand Arur15-Apr-12 21:23 
Hello, I have a Details View on my page. Since I want to Insert/Update the Content, I have Used the Insert and Edit Template Fields and I have Editor Controls in it. Now I want to get the Content of the Editor and pass it to an object. I simply tried to find the Control from the Details View and Cast it to a textbox, but it gives and Error (which is Obvious).... So Now, I'm not able to understand, How should I move ahead???

Please Help!!! This is my Design Code....


<asp:updatepanel id="updAdministerWebsite" runat="server" updatemode="Conditional">
<contenttemplate>

<asp:detailsview id="dvAdminister" runat="server" height="925px" width="618px"
="" allowpaging="false" autogeneraterows="false" enableviewstate="true" gridlines="None" defaultmode="Insert">
<fields>

<asp:templatefield headertext="Society URL: " headerstyle-height="35" itemstyle-height="35" headerstyle-font-size="11px" headerstyle-font-names="Verdana">
<insertitemtemplate>
<asp:label id="lblURL" runat="server" text="">


<edititemtemplate>


<asp:templatefield headertext="Description of Society: " headerstyle-height="35" itemstyle-height="35" headerstyle-font-size="11px" headerstyle-font-names="Verdana">
<insertitemtemplate>
<cc2:editor id="txtDescriptionEditor" runat="server" height="30" width="480">


<edititemtemplate>
<cc2:editor id="txtDescriptionEditor" runat="server" height="30" width="480" content="<%# Eval("SDT_SOC_Description") %>">



<asp:templatefield>
<itemtemplate>
<%--To keep Space Between the Controls--%>


<asp:templatefield headertext="Directions to Reach Society: " headerstyle-height="35" itemstyle-height="35" headerstyle-font-size="11px" headerstyle-font-names="Verdana">
<insertitemtemplate>
<cc2:editor id="txtDirectionEditor" runat="server" height="30" width="480">



<edititemtemplate>
<cc2:editor id="txtDirectionEditor" runat="server" height="30" width="480" content="<%# Eval("SDT_SOC_Direction") %>">




<asp:templatefield>
<itemtemplate>
<%--To keep Space Between the Controls--%>


<asp:templatefield headertext="Upcoming Events: " headerstyle-height="35" itemstyle-height="35" headerstyle-font-size="11px" headerstyle-font-names="Verdana">
<insertitemtemplate>
<cc2:editor id="txtUpcomingEventsEditor" runat="server" height="30" width="480">



<edititemtemplate>
<cc2:editor id="txtUpcomingEventsEditor" runat="server" height="30" width="480" content="<%# Eval("SDT_SOC_UpcomingEvents") %>">



<asp:templatefield>
<itemtemplate>
<%--To keep Space Between the Controls--%>


<asp:templatefield headertext="Past Events: " headerstyle-height="35" itemstyle-height="35" headerstyle-font-size="11px" headerstyle-font-names="Verdana">
<insertitemtemplate>
<cc2:editor id="txtPastEventsEditor" runat="server" height="30" width="480">



<edititemtemplate>
<cc2:editor id="txtPastEventsEditor" runat="server" height="30" width="480" content="<%# Eval("SDT_SOC_PastEvents") %>">




<asp:templatefield>
<itemtemplate>
<%--To keep Space Between the Controls--%>


<asp:templatefield headertext="Pictures: " headerstyle-height="35" itemstyle-height="35" headerstyle-font-size="11px" headerstyle-font-names="Verdana">
<insertitemtemplate>
<asp:label id="lblPic1" runat="server" text="Picture 1: ">
<asp:fileupload id="FileUploadPic1" runat="server">


<asp:label id="lblPic2" runat="server" text="Picture 2: ">
<asp:fileupload id="FileUploadPic2" runat="server">


<asp:label id="lblPic3" runat="server" text="Picture 3: ">
<asp:fileupload id="FileUploadPic3" runat="server">


<edititemtemplate>
<asp:label id="lblPic1" runat="server" text="Picture 1: ">
<asp:fileupload id="FileUploadPic1" runat="server">


<asp:label id="lblPic2" runat="server" text="Picture 2: ">
<asp:fileupload id="FileUploadPic2" runat="server">


<asp:label id="lblPic3" runat="server" text="Picture 3: ">
<asp:fileupload id="FileUploadPic3" runat="server">



<asp:templatefield headertext="Google Maps Latitude: " headerstyle-height="35" itemstyle-height="35" headerstyle-font-size="11px" headerstyle-font-names="Verdana">
<insertitemtemplate>
<asp:textbox id="txtGMLatitude" runat="server" width="85" text="" maxlength="20">


<edititemtemplate>
<asp:textbox id="txtGMLatitude" runat="server" width="85" text="" maxlength="20" content="<%# Eval("SDT_SOC_Lat") %>">




<asp:templatefield headertext="Google Maps Longitude: " headerstyle-height="35" itemstyle-height="35" headerstyle-font-size="11px" headerstyle-font-names="Verdana">
<insertitemtemplate>
<asp:textbox id="txtGMLongitude" runat="server" width="85" text="" maxlength="20">


<edititemtemplate>
<asp:textbox id="txtGMLongitude" runat="server" width="85" text="" maxlength="20" content="<%# Eval("SDT_SOC_Long") %>">



<asp:templatefield headertext="Society Facebook Link: " headerstyle-height="35" itemstyle-height="35" headerstyle-font-size="11px" headerstyle-font-names="Verdana">
<insertitemtemplate>
<asp:textbox id="txtFBLink" runat="server" width="480" text="" maxlength="500">


<edititemtemplate>
<asp:textbox id="txtFBLink" runat="server" width="480" text="" maxlength="500" content="<%# Eval("SDT_SOC_FBLink") %>">



<asp:templatefield headertext="Society Google+ Link: " headerstyle-height="35" itemstyle-height="35" headerstyle-font-size="11px" headerstyle-font-names="Verdana">
<insertitemtemplate>
<asp:textbox id="txtGPlusLink" runat="server" width="480" text="" maxlength="500">


<edititemtemplate>
<asp:textbox id="txtGPlusLink" runat="server" width="480" text="" maxlength="500" content="<%# Eval("SDT_SOC_GooglePLink") %>">



<asp:templatefield>
<insertitemtemplate>

<asp:button id="btnCancel" runat="server" text="Cancel" skinid="CancelButton">
<asp:button id="btnSave" runat="server" text="Save" skinid="SaveButton" onclick="btnSave_CLICK">



<edititemtemplate>

<asp:button id="btnCancel" runat="server" text="Cancel" skinid="CancelButton">
<asp:button id="btnUpdate" runat="server" text="Update" skinid="UpdateButton" onclick="btnSave_CLICK">











This is my Code Behind...

protected Cls_Admin_SocWebsite_Details InsertValuesIntoObj()
{
TextBox txtDescriptionEditor = (TextBox)dvAdminister.FindControl("txtDescriptionEditor"); // Unable to Cast
TextBox txtDirectionEditor = (TextBox)dvAdminister.FindControl("txtDirectionEditor");
TextBox txtUpcomingEventsEditor = (TextBox)dvAdminister.FindControl("txtUpcomingEventsEditor");
TextBox txtPastEventsEditor = (TextBox)dvAdminister.FindControl("txtPastEventsEditor");
TextBox txtGMLatitude = (TextBox)dvAdminister.FindControl("txtGMLatitude");
TextBox txtGMLongitude = (TextBox)dvAdminister.FindControl("txtGMLongitude");
TextBox txtFBLink = (TextBox)dvAdminister.FindControl("txtFBLink");
TextBox txtGPlusLink = (TextBox)dvAdminister.FindControl("txtGPlusLink");

Cls_Admin_SocWebsite_Details Newobject = new Cls_Admin_SocWebsite_Details();
Newobject.par_SDT_SOC_UNQ_ID = Convert.ToInt32(Session["SocietyId"]);
Newobject.par_SDT_SOC_Description = txtDescriptionEditor.Text;
Newobject.par_SDT_SOC_Direction = txtDirectionEditor.Text;
Newobject.par_SDT_SOC_UpcomingEvents = txtUpcomingEventsEditor.Text;
Newobject.par_SDT_SOC_PastEvents = txtPastEventsEditor.Text;
Newobject.par_SDT_SOC_Lat = Convert.ToDecimal(txtGMLatitude.Text);
Newobject.par_SDT_SOC_Long = Convert.ToDecimal(txtGMLongitude.Text);
Newobject.par_SDT_SOC_FBLink = txtFBLink.Text;
Newobject.par_SDT_SOC_GooglePLink = txtGPlusLink.Text;

return Newobject;
}

I'm going to pass the Object to the method in my BOL and hence add the Content in my Database table...
AnswerRe: How to get values from Ajax Editor control inside the Details view??? Pin
Not Active16-Apr-12 1:43
mentorNot Active16-Apr-12 1:43 
QuestionTelerik Rad Menu Data Sources Pin
Karthik Harve15-Apr-12 19:17
professionalKarthik Harve15-Apr-12 19:17 
QuestionWhere to set language and culture Pin
Priya Prk15-Apr-12 9:18
Priya Prk15-Apr-12 9:18 
AnswerRe: Where to set language and culture Pin
Bernhard Hiller15-Apr-12 21:51
Bernhard Hiller15-Apr-12 21:51 
AnswerRe: Where to set language and culture Pin
Vipin_Arora16-Apr-12 20:09
Vipin_Arora16-Apr-12 20:09 
AnswerRe: Where to set language and culture Pin
Grace Daniel16-Apr-12 23:51
Grace Daniel16-Apr-12 23:51 
AnswerRe: Where to set language and culture Pin
mitnick5625-Apr-12 3:51
mitnick5625-Apr-12 3:51 
QuestionJSON and C# Pin
xy000114-Apr-12 20:49
xy000114-Apr-12 20:49 
AnswerRe: JSON and C# Pin
Ali Al Omairi(Abu AlHassan)15-Apr-12 2:14
professionalAli Al Omairi(Abu AlHassan)15-Apr-12 2:14 
Questionretrieving blob data(image) and display in a picture box Pin
amSherihan13-Apr-12 23:24
amSherihan13-Apr-12 23:24 
AnswerRe: retrieving blob data(image) and display in a picture box Pin
Ali Al Omairi(Abu AlHassan)14-Apr-12 4:11
professionalAli Al Omairi(Abu AlHassan)14-Apr-12 4:11 
Questionhow to handle error Pin
Member 868940013-Apr-12 8:35
Member 868940013-Apr-12 8:35 
AnswerRe: how to handle error Pin
Not Active13-Apr-12 9:15
mentorNot Active13-Apr-12 9:15 
AnswerRe: how to handle error Pin
jkirkerx13-Apr-12 10:06
professionaljkirkerx13-Apr-12 10:06 
QuestionProblem with Forms Authentication Provider Pin
Flum02113-Apr-12 7:39
Flum02113-Apr-12 7:39 
AnswerRe: Problem with Forms Authentication Provider Pin
Leonardo Metelis13-Apr-12 9:02
Leonardo Metelis13-Apr-12 9:02 
GeneralRe: Problem with Forms Authentication Provider Pin
Flum02113-Apr-12 23:50
Flum02113-Apr-12 23:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.