Click here to Skip to main content
15,903,033 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: cookies : how to write page_load to cookies Pin
Mariusz Wojcik5-Jun-07 2:05
Mariusz Wojcik5-Jun-07 2:05 
QuestionValidation to accept only numbers!!! Pin
rameshbhojan5-Jun-07 1:30
rameshbhojan5-Jun-07 1:30 
AnswerRe: Validation to accept only numbers!!! Pin
Mariusz Wojcik5-Jun-07 1:56
Mariusz Wojcik5-Jun-07 1:56 
AnswerRe: Validation to accept only numbers!!! Pin
Nouman Bhatti5-Jun-07 2:14
Nouman Bhatti5-Jun-07 2:14 
AnswerRe: Validation to accept only numbers!!! Pin
koolprasad20035-Jun-07 2:16
professionalkoolprasad20035-Jun-07 2:16 
GeneralRe: Validation to accept only numbers!!! Pin
DavidNohejl5-Jun-07 4:23
DavidNohejl5-Jun-07 4:23 
AnswerRe: Validation to accept only numbers!!! Pin
Rahul Babu5-Jun-07 3:42
Rahul Babu5-Jun-07 3:42 
Questionneed help with adding an all option to the data grid parameter. Pin
neodeaths5-Jun-07 1:09
neodeaths5-Jun-07 1:09 
>hi i currently have an dataview which have some data. it is link to an dropdownlist which contain the type.

i have added the ALL option to the dropdownlist however i cant get it to work.

could anyone help me or giv option/suggestion i am really stuck...

(what i want is to have a dropdownlist which would filter the type of data i have in the gridview <==this i have achieve but i cant seem to add an ALL button to view all record)

also if possible i would like to have the dropdownlist retain the selected option retain after the datagrid have change

below is some part of my code which i think is vital currently i have achieve the filter of type however i cant seem to have the ALL option working..


<br />
protected void Page_Load(object sender, EventArgs e)<br />
<br />
{<br />
<br />
if (!IsPostBack)<br />
<br />
{<br />
<br />
SqlConnection conn = new SqlConnection((ConfigurationManager.ConnectionStrings["ASPNETDBConnectionString1"]).ToString());<br />
<br />
SqlCommand cmd = new SqlCommand("SELECT DISTINCT Type FROM Product", conn);<br />
<br />
try<br />
<br />
{<br />
<br />
conn.Open();<br />
<br />
SqlDataReader dr = cmd.ExecuteReader();<br />
<br />
ddltype.Items.Add("All");<br />
<br />
<br />
while (dr.Read())<br />
<br />
{<br />
<br />
ddltype.Items.Add(dr.GetValue(0).ToString());<br />
<br />
}<br />
<br />
<br />
}<br />
<br />
catch<br />
<br />
{<br />
<br />
}<br />
<br />
conn.Close();<br />
<br />
}<br />
<br />
else<br />
<br />
{<br />
<br />
 <br />
<br />
protected void ddltype_SelectedIndexChanged(object sender, EventArgs e)<br />
<br />
{<br />
<br />
<br />
string pType = ddltype.SelectedItem.Text.ToString();<br />
<br />
//Label1.Text = Type.ToString().Trim();<br />
<br />
<br />
<br />
Response.Redirect("Product.aspx?Type=" + pType);<br />
<br />
<br />
}<br />
<br />
///////////////////////////////<br />
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>"<br />
<br />
SelectCommand="SELECT [ID], [Name], [quantity], [Pic], [Type], [comment], [desc] FROM [Product]"><br />
<br />
</asp:SqlDataSource>

Questionhow to display, modify MS Excel sheet in ASPX page using .NET 1.1 with C# Pin
rajnish_haldiya5-Jun-07 0:03
rajnish_haldiya5-Jun-07 0:03 
AnswerRe: how to display, modify MS Excel sheet in ASPX page using .NET 1.1 with C# Pin
Sathesh Sakthivel5-Jun-07 0:08
Sathesh Sakthivel5-Jun-07 0:08 
AnswerRe: how to display, modify MS Excel sheet in ASPX page using .NET 1.1 with C# Pin
rajnish_haldiya5-Jun-07 0:18
rajnish_haldiya5-Jun-07 0:18 
AnswerRe: how to display, modify MS Excel sheet in ASPX page using .NET 1.1 with C# Pin
ToddHileHoffer5-Jun-07 9:13
ToddHileHoffer5-Jun-07 9:13 
GeneralRe: how to display, modify MS Excel sheet in ASPX page using .NET 1.1 with C# Pin
rajnish_haldiya5-Jun-07 20:49
rajnish_haldiya5-Jun-07 20:49 
QuestionUploading Images to the file system and the path of the Image in SQL Database Pin
clife5374-Jun-07 23:51
clife5374-Jun-07 23:51 
AnswerRe: Uploading Images to the file system and the path of the Image in SQL Database Pin
Sathesh Sakthivel4-Jun-07 23:56
Sathesh Sakthivel4-Jun-07 23:56 
AnswerRe: Uploading Images to the file system and the path of the Image in SQL Database Pin
Nouman Bhatti5-Jun-07 2:37
Nouman Bhatti5-Jun-07 2:37 
QuestionHow to restrict the contents being copied in ASP.NET Pin
.NET- India 4-Jun-07 23:41
.NET- India 4-Jun-07 23:41 
AnswerRe: How to restrict the contents being copied in ASP.NET Pin
Fred_Smith5-Jun-07 0:23
Fred_Smith5-Jun-07 0:23 
AnswerRe: How to restrict the contents being copied in ASP.NET Pin
koolprasad20035-Jun-07 0:33
professionalkoolprasad20035-Jun-07 0:33 
GeneralRe: How to restrict the contents being copied in ASP.NET Pin
Fred_Smith5-Jun-07 0:52
Fred_Smith5-Jun-07 0:52 
GeneralRe: How to restrict the contents being copied in ASP.NET Pin
Paddy Boyd5-Jun-07 1:17
Paddy Boyd5-Jun-07 1:17 
GeneralRe: How to restrict the contents being copied in ASP.NET Pin
szukuro5-Jun-07 2:05
szukuro5-Jun-07 2:05 
QuestionNHibernate - How to get the current Database connection string? Pin
Dominic Pettifer4-Jun-07 23:34
Dominic Pettifer4-Jun-07 23:34 
QuestionSession problem! Pin
gauthee4-Jun-07 22:53
gauthee4-Jun-07 22:53 
AnswerRe: Session problem! Pin
SimulationofSai4-Jun-07 23:01
SimulationofSai4-Jun-07 23:01 

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.