|
keyur satyadev wrote: so please refer question and then reply.
What more do you want? Do you want someone to write it for you? Read the damn articles! Do something for yourself.
only two letters away from being an asset
|
|
|
|
|
i am not telling u that give me the code. just want to know how can we able to implement this.
so thier is no question of writing the code. :
by the way thanks.
Regards
Keyur Satyadev
modified on Thursday, June 18, 2009 9:27 AM
|
|
|
|
|
|
it will not allow user to give half rating for particular user.
thanks for reply.
Regards
Keyur Satyadev
|
|
|
|
|
What is it that you want? This, and the other examples provided to you, do allow half ratings.
Stop asking and start doing!
only two letters away from being an asset
|
|
|
|
|
set count star to 10 and when you give 5 then it will be half.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
keyur satyadev wrote: it will not allow user to give half rating for particular user
Did you read this article?
|
|
|
|
|
Hi,
How to check a session is null?
Thankyou
YPKI
|
|
|
|
|
if (Session["XYZ"] == null)
{
}
himanshu
|
|
|
|
|
Or in VB.Net
If Session("XYZ")=Nothing Then
End If
CC26
|
|
|
|
|
C#
---------------------------
if (Session["user"] == null)<br />
{<br />
<br />
}
living none stoping.
|
|
|
|
|
Hi,
I'm having a problem with session state being lost in the live environment when using Internet Explorer Versions 6,7 or 8.
The application I am working on is www.rugbyroundup.com[^]. The behaviour should be that when a user selects a country they get a different country based page, with different Fixtures and Results available. Then, when clicking on the various Leagues, they should stay with that country. For instance, if you were to select England, followed by National 1 you would still see the England Bar after selecting the National 1 League.
This is happening correctly in Mozilla Firefox. However, in Internet Explorer, after clicking the League, the Country setting returns to international!!! (this can be seen by the change of the flags towards the top of the page).
What is equally infuriating is that when testing against my local development version, it functions perfectly on both browsers!!!
I've done a bit of investigation into the problem. As the page is using IFRAMES I had a look at the article Session variables are lost if you use FRAMESET in Internet Explorer 6[^] but after giving the various resources the appropriate HTTP Headers the problem is still occurring.
I also looked at the Trace when the pages are being run - here is a summary:
LIVE
====
Mozilla
Browse to index
index fires twice with same session variables
select country
index fires twice with same session variables
Got to League
Fires twice with same session variables
IE
Browse to Index
index fires once with correct session variables.
Select country
index fires twice, Second time, the Country code is changed, almost reset
Local
=====
Mozilla
Browse to index
index fires twice with same session variables
select country
index fires twice with same session variables
Got to League
Fires at least once --- does fire twice - page load occurred twice, thread stack was overflown...
IE
Browse to Index
index fires once with correct session variables.
Select country
index fires once with correct session variables
Select League
league.aspx fires once with correct session variables.
I would be grateful for any help with this problem
modified on Thursday, June 18, 2009 10:06 AM
|
|
|
|
|
Respected Sir
This is laxman I have one query please give reply to me that is
How to Set the Size of the textbox According to the Size Of The
Data Plese Send me Reply
Thank u sir
Lakshman
|
|
|
|
|
What do you mean?
Textboxes are generally used to input data from the user.
You want to set the size of the textbox while user types something to the textbox. This is weird.
If this is so, then what size means, you mean width of the textbox. You can set width using javascript.
|
|
|
|
|
|
This will solve your problem to some extent:
<pre>
<asp:TextBox ID="TextBox1" runat="server" onkeypress="return dWd(this);" onkeyup="return dWd2(this);" onkeydown="return dWd2(this);" Width="20"></asp:TextBox>
<script language="javascript">
function dWd(e)
{
var wt=parseInt(e.style.width);
wt+=10;
e.style.width=wt + "px";
}
function dWd2(e)
{
if(event.keyCode==8)
{
if(parseInt(e.style.width)>20)
{
var wt=parseInt(e.style.width);
wt-=10;
e.style.width=wt + "px";
}
}
}
</script>
</pre>
CC26
|
|
|
|
|
Hi im actually working on a project. Actually its about storing and retrieving student details from the data base. I hav totally designed 3 webforms.
1st webform has a login form
2nd webform has 3 buttons in it
3rd webform has the grid view which displays the student records frm DB
Now heres the problem actually when i click button1 in my 2nd webform it must disable the edit and delete option of my grid view in the 3rd webform and wen i click button2 in 2nd webform it must enable the edit and delete option in my gridview in the 3rd webform. the edit and delete are link buttons.
Can anyone plzzz help me its bit urgent...
Thashif
|
|
|
|
|
Don't cross post
himanshu
|
|
|
|
|
i hav edited my post yaar... well sorry
|
|
|
|
|
try to transfer information from 2nd page to 3rd page on button click using session or querystring or any technique u r used to.Then according to the information enable or disable edit and deleted button.
CC26
|
|
|
|
|
hi
i have a gridview.
i am filling gridview through a view,
i am inserting a record through a storedprocedure and
i want to display the last inserted record as a last record and also i want to highlight the record as well as focus on the newly inserted record.
provide code for this one..
Koti
|
|
|
|
|
Assuming your first row of gridview is the last inserted record
in design mode provide backcolor in SelectedRowStyle or in your CSS.
then in ur insert function after Binding gridview write the below line
gridview1.SelectedIndex = 0;
|
|
|
|
|
The Code
In order to run the code below, you must first set up Membership. The simplest way to do this is to simply add to your web.config a very small section enabling RoleManager. This will automatically create the membership database in sqlexpress. You should probably add a couple users just so your gridview is not empty from the start. The code you need to add to an empty asp.net 2.0 web site project is as follows (put it in the <System.Web> section).
<roleManager enabled=“true“></roleManager>
Once you have done that, you can copy the code below to a new web page and simply run it.
Briefly, the way the code works is that when a row is inserted into the database the sqldatasource’s Inserted event is called. In this event, we take a look at the return parameter which comes from the sql:
InsertCommand=”INSERT INTO [Names] ([name]) VALUES (@name);SELECT @NewID = Scope_Identity()”
NewId is actually a return parameter, so we can get that back in the inserted event. Once we get the value back, we store it in viewstate so that on the upcoming page_prerender, we can check and see which row has that id in it, and then highlight that row. The reason we do it in prerender and not load is because the inserted event is processed after load and it would not work if we put it there.
So, here is the code! Good luck.
<%@ Page Language=”C#” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<script runat=”server”>
// simple table named: Names. Two columns: id int, name varchar(64)
protected void ButtonInsert_Click(object sender, EventArgs e)
{
SqlDataSource1.InsertParameters["name"].DefaultValue = DateTime.Now.ToString();
int numInserted = SqlDataSource1.Insert();
GridView1.DataBind();
}
protected void SqlDataSource1_Inserted(object sender, SqlDataSourceStatusEventArgs e)
{
object newId = e.Command.Parameters["@NewId"].Value;
ViewState["NewId"] = Convert.ToInt32(newId);
}
protected void Page_PreRender(object sender, EventArgs e)
{
string newIdLast = string.Empty;
if (ViewState["NewId"] != null)
{
int newId = (int)ViewState["NewId"];
newIdLast = newId.ToString();
int rowCnt = 0;
foreach (GridViewRow row in GridView1.Rows)
{
string newIdText = row.Cells[1].Text;
if (newIdText.Equals(newIdLast))
{
//GridView1.EditIndex = rowCnt;
//GridView1.SelectedIndex = rowCnt;
row.Attributes.Add(“bgcolor”, “Gray”);
break;
}
rowCnt++;
}
}
}
</script>
<html xmlns=”http://www.w3.org/1999/xhtml” >
<head id=”Head1″ runat=”server”>
<title>Untitled Page</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<h2>Example of GridView that shows highlighted last inserted row</h2>
<br />
<asp:GridView ID=”GridView1″ runat=”server” AutoGenerateColumns=”False” DataKeyNames=”id” DataSourceID=”SqlDataSource1″ >
<Columns>
<asp:CommandField ShowEditButton=”True” ShowDeleteButton=”True” />
<asp:BoundField DataField=”id” HeaderText=”id” InsertVisible=”False” ReadOnly=”True”
SortExpression=”id” />
<asp:BoundField DataField=”name” HeaderText=”name” SortExpression=”name” />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID=”SqlDataSource1″ runat=”server” ConnectionString=”<%$ ConnectionStrings:ConnectionString %>“
DeleteCommand=”DELETE FROM [Names] WHERE [id] = @id”
InsertCommand=”INSERT INTO [Names] ([name]) VALUES (@name);SELECT @NewID = Scope_Identity()”
SelectCommand=”SELECT [id], [name] FROM [Names]“ UpdateCommand=”UPDATE [Names] SET [name] = @name WHERE [id] = @id” OnInserted=”SqlDataSource1_Inserted”>
<DeleteParameters>
<asp:Parameter Name=”id” Type=”Int32″ />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name=”name” Type=”String” />
<asp:Parameter Name=”id” Type=”Int32″ />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name=”name” Type=”String” />
<asp:Parameter Direction=Output Name=”NewId” Size=4 Type=Int16 />
</InsertParameters>
</asp:SqlDataSource>
<br />
<br />
<asp:Button ID=”ButtonInsert” runat=”server” OnClick=”ButtonInsert_Click” Text=”Insert Record” /></div>
</form>
</body>
</html>
|
|
|
|
|
Hi
I have a textbox suppose if i enter like abcdefg (assume width is 100)
and
if i enter like abcdefghijklmnopqrstuvwxyz the width should be increased based on the input which i am providing.
how to solve, let me know the code for this one...
Koti
|
|
|
|
|
This will solve your problem to some extent:
<asp:TextBox ID="TextBox1" runat="server" onkeypress="return dWd(this);" onkeyup="return dWd2(this);" onkeydown="return dWd2(this);" Width="20"></asp:TextBox>
<script language="javascript">
function dWd(e)
{
var wt=parseInt(e.style.width);
wt+=10;
e.style.width=wt + "px";
}
function dWd2(e)
{
if(event.keyCode==8)
{
if(parseInt(e.style.width)>20)
{
var wt=parseInt(e.style.width);
wt-=10;
e.style.width=wt + "px";
}
}
}
</script>
CC26
|
|
|
|