|
changes like change color of gridview not in data source or database
|
|
|
|
|
haleemasher wrote: changes like change color of gridview
where is the code for that.... in which you you are writing the code for color change...
|
|
|
|
|
In your .aspx code - you give the "DataSourceID="SqlDataSource1"" - r u bind with this sqldatasource in aspx page, where is that code ?Post your full code with Sqldatasource.
|
|
|
|
|
SqlConnection cnx = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|Coupon Management.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
SqlDataAdapter da1 = new SqlDataAdapter();
DataSet ds = new DataSet();
SqlCommand cmd = new SqlCommand();
DataTable dataTable;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
FillVendorGrid();
}
}
private void FillVendorGrid()
{
dataTable = new DataTable();
cmd.Connection = cnx;
cmd.CommandText = "SELECT CouponType.CouponName, Coupon_Info.Coupon_TypeID FROM CouponType INNER JOIN Coupon_Info ON CouponType.CouponTypeID = Coupon_Info.Coupon_TypeID";
da1 = new SqlDataAdapter(cmd);
da1.Fill(dataTable);
GridView1.DataSource = dataTable;
GridView1.DataSourceID = String.Empty;
}
protected void ResultGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
FillVendorGrid();
} protected void deleting(object sender, GridViewDeleteEventArgs e)
{
cmd.Connection = cnx;
cmd.CommandText = "DELETE FROM Coupon_Info WHERE RecievingDate='" + GridView1.DataKeys[e.RowIndex][0] + "'";
cnx.Open();
cmd.ExecuteNonQuery();
cnx.Close();
FillVendorGrid();
}
and asp code is
asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:Coupon ManagementConnectionString2 %>"
SelectCommand="SELECT CouponType.CouponName, Coupon_Info.Coupon_TypeID FROM CouponType INNER JOIN Coupon_Info ON CouponType.CouponTypeID = Coupon_Info.Coupon_TypeID"></asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AutoGenerateColumns="False" AutoGenerateDeleteButton="True"
AutoGenerateSelectButton="True" CellPadding="4" DataSourceID="SqlDataSource1"
ForeColor="#333333" GridLines="None" onrowdeleting="deleting"
style="z-index: 4; top: 425px; left: 280px; position: absolute; height: 312px; width: 691px">
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#E3EAEB" />
<Columns>
<asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" />
<asp:BoundField DataField="Coupon" HeaderText="Coupon"
SortExpression="Coupon" />
<asp:BoundField DataField="Serial Start" HeaderText="Serial Start"
SortExpression="Serial Start" />
<asp:BoundField DataField="Serial End" HeaderText="Serial End"
SortExpression="Serial End" />
<asp:BoundField DataField="Recieved By" HeaderText="Recieved By"
SortExpression="Recieved By" />
</Columns>
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#7C6F57" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
|
|
|
|
|
i think code is perfect, but change the datasource id, i.e
asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:Coupon ManagementConnectionString2 %>"
Here your are giving id="SqlDataSource2"
but in grid your are using "DataSourceID="SqlDataSource1" "
|
|
|
|
|
haleemasher wrote: asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:Coupon ManagementConnectionString2 %>"
haleemasher wrote: AutoGenerateSelectButton="True" CellPadding="4" DataSourceID="SqlDataSource1"
use the correct datasource...
|
|
|
|
|
i change the error that u have mention but it still not working
|
|
|
|
|
|
N Ahmed wrote: I am new in the forum
Then you should read How to get an answer to your question above first
only two letters away from being an asset
|
|
|
|
|
You seem to be saying that you've run out of money and want someone to finish your site for free. Not going to happen, sorry. muslimdirectory sounds like the sort of site where you may find someone with a vested interest to help you for free, but this site is for people who know how to program and have specific questions.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Good day
I'm making a registration form for my web site and need to develope that "security code generator" (which generates a sting and asks the user to write it in one of the registration form's fields). I've googled it but unfotunately i just can't find the right thing i'm searching for. Can you please help me ?
Regards, Hris
|
|
|
|
|
Captcha is what it is called. Go google again :P
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Sometimes i just don't know what to google ......
Thank you.
|
|
|
|
|
Yeah, knowing what to google is the hard bit.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
Hi,
How to play a music file as soon as the client click a button.
eg: when a user click a button a bell shall rang, it may be a small file.
Will the file take time to play even after it already play once?
Can it use as bell for calling token or to call a next person in the queue..etc. It need work in web application.
Thankyou
YPKI
|
|
|
|
|
hi friend u can easily play a file in asp.net...
copy a music file in solutiion-explorer...
and then drag it on the page...
and run the application...
and u can play the music file to click on the link..
|
|
|
|
|
Please do not give absurd answers when you have no idea about how to tackle it.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Is it?
|
|
|
|
|
It's great you want to help. In future, try to only answer questions where you know the real answer.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
You can use windows media player to play your file. I am not sure if there's any way to script it in javascript, you'd have to read up on that. You would host it on your server, and once it's downloaded, it can play over and over on the client side.
having a sound with a button is odd for a website, I would not bother if it's just for effect.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
//you can use like this... Preview is my folder name and TRAD.AVI is my video name
<embed src="Preview/TRAD.AVI" style="HEIGHT: 331px; LEFT: 83px; TOP: 171px; WIDTH: 538px" />
|
|
|
|
|
How can i pause the EMBED file and resum it later?
|
|
|
|
|
it opens in a windows media player... your can stop and run like working with media player.
|
|
|
|
|
I cant get the id and events of the embed windows media player. I want to pause it at runtime from code behind
|
|
|
|