|
Hi
I am trying to insert and delete row from the girdview but I unable to retrieve the value of textbox which I have put on the footer row
the code is following
Dim strEmpName As String
strEmpName =Ctype(GridView1.FooterRow.FindControl("txtEmpName"), TextBox)).Text
each time I am getting the value of strEmpName="" while I entering the value for insertion
Thanks...
|
|
|
|
|
Try this:
For Each r1 As GridViewRow In GridView1.Rows
txtEmpName = DirectCast(r1.FindControl("txtEmpName"), TextBox)
Next
Good luck,=).
|
|
|
|
|
Hi,
I have a web application in ASP/VB6. My client wants to save a a page content in PDF. Is there any way of doing it via ASP/VB6?
Cheers
|
|
|
|
|
Crystal Reports maybe can help you..google it,dude.
|
|
|
|
|
I am planning to build an ASP.NET Server Control which is having a timer control for some time-by-time processing. I am not much aware of ASP.NET Server Control.
I have also followed Creating Serverside Clock Control Using ASP.NET Ajax and C#[^], but its not triggering timer Tick code.
I am using the following code:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Timer tmr = new Timer();
tmr.Interval = 5000;
tmr.Enabled = true;
tmr.EnableViewState = true;
tmr.Tick += new EventHandler<EventArgs>(tmr_Tick);
}
void tmr_Tick(object sender, EventArgs e)
{
}
Am I doing something wrong? Plz help.
|
|
|
|
|
Move this line out of "OnInit":
Hari Om Prakash Sharma wrote: Timer tmr = new Timer();
You are giving it a scope that only exists during OnInit, you're disposing it afterward.
|
|
|
|
|
HI,
I have a database driven chat room which refreshes after every 10 sec. If the user is typing some thing on the chat box teh page refreshes and focus is set to the start of chat textbox. i want to set the focus on teh right where the user is currently typoing e.g if page refreshes and he has already typed Hell, then focus should be after l, not from start.
Thanks in advance..
|
|
|
|
|
The standard technique for doing this is actually quite different. When you perform your refresh, you don't actually refresh everything on the page - what you do, instead, is refresh only certain parts of the screen. Using AJAX you retrieve the data you need and then you update the small areas of the screen that have changed. This leaves the textbox untouched, and the user can carry on without having focus flash around on them.
|
|
|
|
|
the best method to implement your application is not to postback page in every 10sec ... you'd better use ajax calls ... but if you want to do it after postback you shoud produce some scripts (javascript) code dynamically to focus on the previous control that user was using ...
|
|
|
|
|
Hi,
Im facing the probelm in filtering the record using the date criteria. Im having 2 column FromDate and ToDate.
Eg: FromDate : 28/04/2011 & ToDate : 11/03/2012
If i pass the FromDate as 04/09/2011 and ToDate as 10/09/2011 means i need to get the above the record, but i cant able to the data.
Query i used date criteria:
------------------------------
[FromDate] >= FromDate.Value && [FromDate] <= ToDate.Value && [ToDate] >= FromDate.Value && [ToDate] <= ToDate.Value
Can i know the pblm in the above query.
Thanks,
Senthil V.
|
|
|
|
|
Firstly, looking at those square brackets on table column names, it appears to me this T-SQL not Linq as you say it is?
If it is T-SQL here goes it:
"SELECT * FROM [Table] WHERE [FromDate] >= '" + FromDate.Value + "' AND [ToDate] <= '" + ToDate.Value + "';"
Otherwise if it's indeed Linq-SQL then try this:
var myTableData = dataContextInstance.MyTable.Where( e => e.FromDate >= DateTime.Parse( FromDate.Value ) && e.ToDate <= DateTime.Parse( ToDate.Value ) ).ToList();
hope this will help otherwise clarify a little on ya question.
Morgs
|
|
|
|
|
Hi,
Try to reverse the comparissons and see what happens
|
|
|
|
|
hi,
what i want:- bind database value in .aspx page in a data control like datalist
but i want to apply jquery on it bcaz want to show effects on it
The Problem :-downloaded jquery only works with img tag but in datalist i can use image control so....jquery is not working
is there any way for
1. binding database values with img tag instead of image control
OR
2. can jquery work with img control
if anybody knows pls pls reply me
thnkxx in advance
|
|
|
|
|
your question isn't clear you want to set src of image that come from database?
|
|
|
|
|
hi, my prob is that i want to implement jquery on images bt images are in database.
i can bind them and able to show with image control but the problem is that jquery is not working in image control.
it works with img tag
|
|
|
|
|
Member 7980675 wrote: binding database values with img tag instead of image control
For asp.net Image control path is given to ImageUrl
<asp:Image ID="img1" runat="server" ImageUrl='<%# Eval("path") %>'></asp:Image>
For HTML img path is set to src
<img id="image1" src='<%# Eval("path") %>' />
|
|
|
|
|
hello, thanz for this
but my prob is that i want to implement jquery on images bt images are in database.
i have done this with image control but the problem is that jquery is not working in image control.
it works with img tag
|
|
|
|
|
please send me the HTML and the behind code you tried on.
Help people,so poeple can help you.
|
|
|
|
|
in .aspx page...
<asp:DataList ID="DataList1" runat="server" RepeatDirection="Horizontal"
RepeatColumns="4" RepeatLayout="Table"
CellPadding="5" CellSpacing="10" onitemcommand="DataList1_ItemCommand"
>
<ItemTemplate>
<div>
<%--<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%#Eval("image_name") %>' height="200" width="120" BorderColor = "#FFCC01" BorderStyle = "outset" BorderWidth = "8" CommandName="img" CommandArgument = '<%#Eval("image_id") %>'/>--%>
<p><img id="image1" runat="server" border="0" src='<%#Eval("image_name") %>' style="border-color:#FFCC01;border-style:outset;border-width:8px;" height="200" width="120" /><p>
<br />
</div>
</ItemTemplate>
</asp:DataList>
in this page i want jquery on img tag...and in that it takes src value of img tag and zoom it
bt in case of eval function its not working.....
is simple word if i use simple img tag and give value of any image then jquery is working fine bt wen i give eval function bcaz images are in database then jquery is not working.....
|
|
|
|
|
I think that there is no differences between both case, because image src would be rendered in the same way.
What I think is you used image ids in the jquery selector. try this:
<asp:DataList ID="DataList1" runat="server"
RepeatDirection="Horizontal"
RepeatColumns="4"
CellPadding="5"
CellSpacing="10"
>
<ItemTemplate>
<div>
<p><img id="image1" runat="server" border="0" src='<%#Eval("image_name") %>' style="border-color:#FFCC01;border-style:outset;border-width:8px;" height="200" width="120" /><p>
<br />
</div>
</ItemTemplate>
</asp:DataList>
<script type="text/javascript">
$(document).ready( function() {
$("#<%= DataList1.ClientID %> img").animate();
});
</script>
We used the selector $("#<%= DataList1.ClientID %> img") beacase the markups would be renderer as
<table id="DataList1.ClientID">
<tr><td>
<img id="DataList1.ClientID_ctr100_Image1" ... />
</td> ... </tr>
...
</table>
Good luck
Help people,so poeple can help you.
|
|
|
|
|
hello sir,
yuppppiiiiii it worked....thanxxx a lot
m so happy..thanku so much for ur reply........
u really helped me
thankss to all
|
|
|
|
|
Sir;
Dose m@dhu's answer solve your problem?
Help people,so poeple can help you.
|
|
|
|
|
have replied sir .....
|
|
|
|
|
In asp.net website , Videos are palying well on that system on which website hosted,but these are not palying on others ,I have tried more than 3 hours,But I am Unable to undersatand the problem please help me.
embed1.Attributes.Add("src", @"http://~/Uploads4/" + e.CommandArgument.ToString() + "");
embed1.Attributes.Add("filename", Server.MapPath(e.CommandArgument.ToString()));
embed1.Attributes.Add("ShowControls", "1");
<embed runat="Server" id="embed1" type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/"
width="424" height="379"
autostart="1" showcontrols="1" showstatusbar="1" videoborder3d='1' designtimesp='5311' loop='true' >
</embed>
|
|
|
|
|
Hi everybody
How Can I Bind List<t> to datagridview?IS it possible in asp.net
Thanks
|
|
|
|