|
Let me clear the thing first, Caching and Session both are server side state management. Session is User Specific , Session data is stored in either Memory Object, or in State Server or in SQL Server . You can read This[^] article for Detail on session.
Cache store data on server and its is not user specific, so all user will get the same data.
NidhiKanu wrote: o if same person log in from different computers ten wat happen.it will clash both or will some infliction occur
I didn't get your point.
|
|
|
|
|
i mean if any user login through same userid and password from different 2 location then wat will happen
N!dh!
|
|
|
|
|
Hi all ,
I am using a gridview in which the values of one column are my primary keys of the table.What i want is how can i hide that column and when deleting the row in gridview how can i access that hided column value ????
Thanks in advance............
|
|
|
|
|
put your Primary Key in a hidden field in Template Field and get it by using find control for that row.
No, The hidden variable will be a child control of each row.
GridViewId.Rows[index].FindControl("hidden_field")
|
|
|
|
|
Map Primarykey values into Gridview Datakeynames Property. ex: DataKeyNames="<primarykey id="">"
int id = (int)gridview1.DataKeys[e.RowIndex].Value;
|
|
|
|
|
Set its width to 0px in the ColumnHeader attributes, and it will not be shown, but will still be accessible (since it's still actually rendered, whereas setting it to visible=false actually prevents it being rendered)
C# has already designed away most of the tedium of C++.
|
|
|
|
|
Hai
I have some n number of fileupload control in my site. During submission i need to save the file in some loaction and save file location in DB. So i write a single function to do this process and call the function for the n number of controls. To do so i am inneed to pass the file controls as args to that function. How to achieve this.
Thanks in advance.
modified on Tuesday, February 3, 2009 3:34 AM
|
|
|
|
|
Am I missing something, or are you asking how to write a basic method signature in .NET ? If you're talking about an event, you can't change their signatures. If you're talking about a basic method, what is the issue ? Also, you don't need to pass the file controls ( although you sure can ), you can pass the file data without passing the controls, if you need to.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi.
I need to put refrence of a HTMLForm (not the form itself) in a viewstate.
How can I do this?
Best wishes
|
|
|
|
|
Why on earth would you want to do that ? The form doesn't exist, how can you store a reference to it ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
<asp:GridView ID="GridView1" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84"
BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Total" Enabled="False" Height="278px" Width="515px" Font-Size="Large" OnRowDataBound="GridView1_RowDataBound" >
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:TemplateField HeaderText="Article Subject">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" Font-Underline="True" Text='<%# Eval("TA_VC50_ArtName") %>' ForeColor="Purple" Visible="<%# true %>" PostBackUrl="default1.aspx"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Author">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("TA_VC50_ArtAuthor") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="marks">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Eval("Total") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<AlternatingRowStyle Font-Size="Large" />
</asp:GridView>
</td
|
|
|
|
|
anujbanka1784 wrote: Visible="<%# true %>"
What the hell is this ?
Define 'not working'. What is happening ? I am assuming the Text is not evaluting properly. Perhaps you need to use <%= ? I'm never sure, I just try different ones until it works...
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hai,
i am doing crm project.i upload the database, file and data in new server path.but old server working fine.it export csv file .but new server display error.what can i do ?if you know answer replay to me....
Thank you...!
|
|
|
|
|
hai,
Thank You.i assign provision on this folder.but still doesn't work .anymore solution you known ?
|
|
|
|
|
Is this URL within your website ? What code is trying to open the file ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hai,
Thank You.this folder inside server.this code is work fine in afxisi.net server.but today i did upload my files,db.data change in afxisi.org server so this server not support.
export csv coding
**********
System.Threading.Thread.Sleep(3000);
StreamWriter sw = new StreamWriter(Server.MapPath("Export\\contacts.csv"));
sw.WriteLine("{0},{1},{2}","Title", "First Name", "Last Name");
if (con.State.ToString() == "Closed") { con.Open(); }
SqlDataAdapter adp = new SqlDataAdapter("select title,firstname,lastname,officephone,mobileno,accountname,homephone,otherphone,fax,title1,department,donotcall,team,assignedto,emailprimary,secondaryemail1,secondaryemail2,secondaryemail3,primaryaddress,primarycity,primarystate,primaycountry,primaypostalcode,secondaryaddress,secondarycity,secondarystate,secondarycountry,secondarypostalcode,description,middlename,suffix,company,jobtitle,businessstreet2,businessstreet3,homestreet2,homestreet3,otherstreet,otherstreet2,otherstreet3,othercity,otherstate,otherpostalcode,othercountry,assistantsphone,businessfax,businessphone,businessphone2,callback,carphone,homefax,homephone2,isdn,pager,primaryphone,radiophone,ttytddphone,telex,aniversary,billinginformation,birthday,businessaddresspobox,categories,children,directoryserver,emailtype,emaildisplayname,email2type,email2displayname,email3type,email3displayname,gender,governmentidnumber,hobby,homeaddresspobox,initials,internetfreebusy,keywords,language,location,managersname,mileage,notes,officelacation,organizationalidnumber,otheraddresspobox,priority,private,profession,sensitivity,spouse,user1,user2,user3,user4,webpage,groupname,status from leads where groupname='" + txtgroupname.SelectedValue+"'", con);
DataSet ds = new DataSet();
adp.Fill(ds);
if (ds.Tables[0].Rows.Count > 0) {
for (int io = 0; io < ds.Tables[0].Rows.Count; io++) {
sw.WriteLine("{0},{1},{2}",ds.Tables[0].Rows[io][0].ToString(),ds.Tables[0].Rows[io][1].ToString(),ds.Tables[0].Rows[io][2].ToString());
}
}
if (con.State == ConnectionState.Open) {con.Close(); }
sw.Close();
string filename = Server.MapPath("Export\\contacts.csv");
Session["filenames"] = filename;
exportframe.Attributes["src"] = "./crmexport.aspx";
if you know any solution replay to me...
|
|
|
|
|
OK, you're sure you're able to set the file permissions on the server ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|