|
what do you mean repeater
do you mean a loop?
|
|
|
|
|
Repeter means <asp:repeter id="sam" runat="server">
its a control
Final year student of MCA
|
|
|
|
|
Hello friends........
I am having some problem in my project....
I have to submit the questions in the database but the problem is that if some question are having images then what to do?????
How to save the whole question with the images at its proper location and how to retrieve the question.
Help me plzzzzzzzzz
I want to import bulk of data from the excel sheet....i think if i convert each cell value that is either question or option with or without images to an single image....such as each question and its answer are having unique images...and now save their path in the database and images on the server.........
IS is possible?????
How to retrieve cell value from the excel and convert it into image...
Deepak Nigam
|
|
|
|
|
there are a view ways to save images
you can just save the image location in your database table column then write some front end code to access that table and display the image
or you could store the image in the database, this has problems however because you will need a large database if you plan to store lots of images
hope this helps
|
|
|
|
|
Thanks Dear,
What to do??
When I have to upload a bulk of data???
It'll not be a good way to load each image...and it'll be very time consuming.........
Deepak Nigam
|
|
|
|
|
no can you explain the siutation more?
are users uploading images to your web server?
|
|
|
|
|
No Only Admin will upload papers.
But i want to do this with more flexibility such as just import the excel sheet.......
But i think that i can restrict the admin to set a flag where ever an image come and put the server path of that image between the flags.
So that while retrieveing the text i can find the image path and build a dynamic image on runtime.......
Its my idea is it okay.......
Deepak Nigam
|
|
|
|
|
Hey all,
I'm trying to edit my Web.config in runtime, but I get some weird behaviour. Probably something simple I couldn't find on the net. But I'm new to this, so bear with me.
In my code I open the ~/Web.config file and it reads it from the rood of my project folder. When I try to save it to ~/Web.config, it writes it to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\~\Web.config instead.
How can the same relative path point to 2 places? Read from here but write to there ?!? How do I solve this?
Here is my sample code:
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="webconfig._Default" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head runat="server"><br />
<title>Untitled Page</title><br />
</head><br />
<br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br /><br />
<hr /><br />
<br /><br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br /><br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="save Web.Config" /><br /><br />
<asp:TextBox ID="TextBox3" runat="server" Width="754px"></asp:TextBox></div><br />
</form><br />
</body><br />
</html><br />
Default.aspx.cs
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Collections;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
<br />
namespace webconfig<br />
{<br />
public partial class _Default : System.Web.UI.Page<br />
{<br />
System.Configuration.Configuration config;<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~/Web.config");<br />
TextBox1.Text = System.Web.Configuration.WebConfigurationManager.AppSettings["myKey"];<br />
}<br />
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
System.Web.Configuration.WebConfigurationManager.AppSettings["myKey"] = TextBox2.Text;<br />
config.SaveAs("~/Web.config");<br />
TextBox3.Text = config.FilePath;<br />
}<br />
}<br />
}<br />
Web.config
<?xml version="1.0"?><br />
<br />
<configuration><br />
<br />
<appSettings><br />
<add key="myKey" value="ABCD"/><br />
</appSettings><br />
<connectionStrings/><br />
<br />
<system.web><br />
<compilation debug="true" /><br />
<authentication mode="Windows" /><br />
</system.web><br />
<br />
</configuration><br />
|
|
|
|
|
i dont think its your code i think you just need to make sure you save it to your root folder of your application.
Becausae its a different file to a normal c# file its behaviour is different when you save
Bear in mind i'm not 100% sure on this
|
|
|
|
|
How do I make sure? Code a absolute path or something?
|
|
|
|
|
how does sms gateway work?
|
|
|
|
|
I guarentee it does not involve ASP.NET.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi read the link below will give you the complete info about that .
Click Here
Yogesh Agarwal
|
|
|
|
|
I bind datas from qury into a dattabla.Is it possible to set the data in the datatable will be bold.Please help me to answer this query.
|
|
|
|
|
You mean to say that of grid View... Ofcourse you can if you want to set the complete gridView test to Bold. Select the property rowstyle > Font > Bold to true.
If you want only a specific column to be bold
Then select the column > Item Style > Font > Bold = true.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
The DataTable is a class whose object instances are used to store data. It is not used for presentation purposes, but can used as the datasource for data-bound controls.
I don't know what control you are actually using, but you can embolden HLML text by using either the <b/> tag or through CSS.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
No, data is never bold. That's a rendering detail. Of course if you show the data in a grid, or whatever, you can add the HTML to make it render as bold, that's easy. Just put the data binding expression inside <strong> tags
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
is it possible to apply a custom validation to a grid view.if it is valid then how to declare a custom validator to a grid view
|
|
|
|
|
Validation applies when the user enters data. If you create a template for editing a row in a grid view, you can add any sort of validators that you like.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
To the complete grid view control ??????? .Can you explain your situation more precise ?
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
iam having a grid view where some data is assigned to it using datatabe .now if the data is not there in the grid view then when a button is clicked it should validate that no data is there using custom validation
|
|
|
|
|
You want to press a button to validate the data that came from your data table ? What on earth for ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am able to save the csv file.
I want to convert the selected row from the gridview, which are selected on the selection of the checkbox of that particular row.
And i want to save the selected records in that CSV file which is getting saved at the specified location
I can do it by bytes of array.
But i don't know the procedure....
|
|
|
|
|
You can do something like this
protected void clientTeamList_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
{
StreamWriter write = new StreamWriter("c:\temp\test.csv");
for (int i = 0; i < gridTeamUserAccess.Rows[e.NewSelectedIndex].Cells.Count; i++)
{
write.Write(gridTeamUserAccess.Rows[e.NewSelectedIndex].Cells[i].Text + ",");
}
write.Close();
}
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Thanks for help!
THE PROBLEM IS SOLVED!
|
|
|
|