|
ok..net was down so by mistake it happened.
|
|
|
|
|
Duplicate Question.Please ignore
|
|
|
|
|
Please don' t cross post.
|
|
|
|
|
Hi,
How to add arl_CoList2 to disabled & checked checkboxes and checked the rest of company id from Table1?
Updating company list:
When page loads it will get from tbCompany with checked checkboxes of company id from Table1.
I want to disabled and checked the checkbox (when company id from Table1 exist in Table2 & Table3)
other checkboxes company id can be added if checked. Only enabled checkbox can be unchecked and deleted.
GridView do not have datakeyname.
<br />
protected void gv_RowDataBound(object sender, GridViewRowEventArgs e) <br />
{ <br />
if (e.Row.RowType == DataControlRowType.DataRow) <br />
{ <br />
ds = new DataSet(); <br />
dv = new DataView(); <br />
arl_CoList2 = new ArrayList(); <br />
<br />
ds = otmcl.GetCompany(Session["Dept"].ToString()); <br />
<br />
if (e.Row.RowState == DataControlRowState.Normal || e.Row.RowState == DataControlRowState.Alternate) <br />
{ <br />
dv = ds.Tables["Company"].DefaultView; <br />
<br />
lbl_CompanyID = (Label)e.Row.FindControl("lblCompanyID");
cb_selectCo = (CheckBox)e.Row.FindControl("CheckThisCompany"); <br />
<br />
ddl.DataSource = dv; <br />
ddl.DataTextField = dv.Table.Columns["CompanyName"].ToString(); <br />
ddl.DataValueField = dv.Table.Columns["CompanyID"].ToString(); <br />
ddl.DataBind(); <br />
<br />
int check = ddl.Items.Count; <br />
<br />
if (check != 0) <br />
{ <br />
GetCheckItems(); <br />
<br />
if (arl_CoList2 != null) <br />
{ <br />
arl_CoList2.Add(hid_id2.Value.ToString()); <br />
<br />
cb_selectCo.Checked = true; <br />
cb_selectCo.Enabled = false; <br />
} <br />
else if (!arl_CoList2.Contains(ddl)) <br />
{ <br />
cb_selectCo.Checked = true; <br />
cb_selectCo.Enabled = true; <br />
} <br />
<br />
} <br />
} <br />
} <br />
<br />
|
|
|
|
|
Hi,
How to Filter/Search context in Office(Word,Excel,pdf documents)
using Indexing Services.
ali
|
|
|
|
|
I know Office documents implements IFilter[^] interface. You can use that to extract text for the indexing service.
Books are as useful to a stupid person as a mirror is useful to a blind person. - Chanakya
|
|
|
|
|
iam having neary 3 webparts in the webpartzone and iam creating two webparts dynamically..now how can i apply themes to this webparts
|
|
|
|
|
I think you must be using some controls in your webpart and that must be in also skin file.If yes, then I dont there is any issue in applying the theme in the new webparts.
If there is another issue please let me know
|
|
|
|
|
|
Hi,
I need to send an email which has an attachment; the attachment is stored in sql server-2005, ina table as an image data type.
Thanks
shank
|
|
|
|
|
Download attachments from database and save in localdrive,then attach it in sending email.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
That database field must be Image type???
You just fetch the data from database and save it into a Stream..then attach it to the email from stream only.
CC26
|
|
|
|
|
Hi,
could you give me some sample code
thanks
|
|
|
|
|
Hi, I am populating a dropdownlist by clientside script.But after every postback the dropdown values vanish.How to persist them?
Thanks
CC26
|
|
|
|
|
DropDownList control have property
AutoPostBack=true If you don't use
selectedindexchange event then set autopostback to false,otherwise post your code and we will see where can be problem.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Probably you didn't get my question.I have no problem with dropdownlist autopostback or anything.
My problem is that, I am populating a dropdownlist using clientside script.
But whenever my page is postback( say...i clicked a button), all dropdownlist items vanish..How to persist them after postback.
CC26
|
|
|
|
|
Hi,
In that case you have to strore these values in hidden field and bind the dropdown again.
himanshu
|
|
|
|
|
May be making use of cookies workout for you.
|
|
|
|
|
protected void UpdateRecord(object sender, GridViewUpdateEventArgs e)
{
GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex];
int autoid = Int32.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());
TextBox tDate = (TextBox)row.FindControl("txtDate");
TextBox tCoupon = (TextBox)row.FindControl("txtcoupon");
TextBox dStart = (TextBox)row.FindControl("txtStart");
TextBox dEnd = (TextBox)row.FindControl("txtend");
TextBox dBy = (TextBox)row.FindControl("txtby");
try
{
cnx.Open();
SqlCommand updateCmd = new SqlCommand("Update Coupon_Info,CouponType set Coupon_Info.RecievingDate=@date,CouponType.CouponName=@Coupon,Coupon_Info.Serial_Start=@Start,Coupon_Info.Serial_End=@End,Coupon_Info.Recieved_By=@By ", cnx);
updateCmd.CommandType = CommandType.Text;
updateCmd.Parameters.Add("@date", SqlDbType.Date).Value = tDate.Text.Trim();
updateCmd.Parameters.Add("@Coupon", SqlDbType.NVarChar, 60).Value = tCoupon.Text.Trim();
updateCmd.Parameters.Add("@Start", SqlDbType.BigInt).Value = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values[0].ToString());
updateCmd.Parameters.Add("@By", SqlDbType.NVarChar, 50).Value = dBy.Text.Trim();
}
catch (Exception ex)
{
ErrorMessage.Text = ex.Message;
}
finally
{
cnx.Close();
cnx.Dispose();
}
}
Asp code for gridview is here
<asp:TemplateField HeaderText="Date" SortExpression="RecievingDate">
<EditItemTemplate>
<asp:TextBox ID="txtDate" Width="100px" runat="server" Text='<%# Bind("RecievingDate") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtDate1" runat="server" Width="100px"></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("RecievingDate") %>'></asp:Label>
Error message DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RecievingDate'.
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Coupon" SortExpression="CouponName">
<EditItemTemplate>
<asp:TextBox ID="txtcoupon" Width="100px" runat="server" Text='<%# Bind("CouponName") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtcoupon1" Width="100px" runat="server" ></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("CouponName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Serial Start" SortExpression="Serial_Start">
<EditItemTemplate>
<asp:TextBox ID="txtstart" Width="100px" runat="server" Text='<%# Bind("Serial_Start") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtstart1" Width="100px" runat="server" ></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Serial_Start") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="End" SortExpression="Serial_End">
<EditItemTemplate>
<asp:TextBox ID="txtend" Width="100px" runat="server" Text='<%# Bind("Serial_End") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtend1" Width="100px" runat="server" ></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("Serial_End") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Recieved By" SortExpression="Recieved_By">
<EditItemTemplate>
<asp:TextBox ID="txtby" Width="100px" runat="server" Text='<%# Bind("Recieved_By") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtby1" Width="100px" runat="server" ></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Bind("Recieved_By") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField HeaderText ="Edit" ShowEditButton="True" />
|
|
|
|
|
hError message DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RecievingDate'. ommandField
Your data source does not contain any property 'RevievingDate'. Check the data source from where you are retrieving the data.
|
|
|
|
|
thanx 4 reply.it has my datasource has a RecievingDate.
|
|
|
|
|
Perhaps it was ReceivingDate?
|
|
|
|
|
I use VSS 2005 And VS 2005 Team Sp1
After The Solution add to SourceSate , the member of team can not get the new file of the other member created from the parent folder's "Get..." Menu.
But can get the new file from project's "Get..." menu.
What's cause?
if I Get New Version from project's "Get.." menu , it will spend a lot of time.
|
|
|
|
|
jason,
This is ASP.NET Forum and your question does not related with ASP.NET. I will suggest you to ask the question in Visual Studio Forum.
Thank You !
|
|
|
|
|
hi all..
i m using activeX control in my website. that activeX control showing some
graphs by doing cube processing on button click.if i press the button 2 times continously then my all the session destroy .on googling
i come to know that if u will make the connection twice with cube (SQL analysing service) the session belongs to http connection will droped.
how to save my session variables...
any suggestion will be appreciated.....
|
|
|
|